skip to Main Content

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

2

Answers


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

    Login or Signup to reply.
  2. check package name in build.gradle (Module level) file

    defaultConfig {
            applicationId "com.example"// Check your package name here
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search