refactoring - Renaming package in Android Studio -


I am trying to rename my Android Studio package as described in the first answer:

< P> org.springframework.android.showcase2 to change org.springframework.android.showcase

Refactoring graphics works fine, so I delete the old package inside /gen/org.springframework.android/showcase try. It happens but then it appears again (within /gen/org.springframework.android/showcase)

When compiling I get more than a 100 errors related to all R.java file references.

RJJA, Manifest. New copying from Java does not work either. The Studio bus is deleted but the BuildConfig.java file is discarded.

Is there an easy way because the studio just does not seem to want to play the ball?

Below is my project structure, it is useful

Enter image details here

If you are looking at files generated with the old package name, Because you only changed the name of the source code package, the generated files use the package name defined in AndroidManifest.xml if you change the package at the top of the manifest, you will see that the generated file Not use the new package.

Make sure to rebuild the project and see the changes

Comments