Home > Software engineering >  R.layout.activity_noconnection error in android studio
R.layout.activity_noconnection error in android studio

Time:06-02

I recently changed my package name using this method. but now when im trying to create a new activity its giving me an error on R.layout.activity_noconnection (on R). then i pressed alt enter to fix the error it imported "import OldPackageName.R" and that fixed the issue, so that means my old package name is still there in in the program . can someone explain to me whats happening and is there way to completly remove the old package name? thank you!

image below

picture

CodePudding user response:

Have a look at you AndroidManifest.xml. Under Application you should find a package name. That should be the one used for R.

CodePudding user response:

check package name in build.gradle (Module level) file

defaultConfig {
        applicationId "com.example"// Check your package name here
}
  • Related