My keystore is corrupt, therefore the Android Market is requiring me to rename the app and resubmit it. However, whenever I go to edit the package names in Manifest and thro
Bernstein has the method, use the Eclipse tool, "Rename Application Package", you may have to do some clean-up even after the fact. Also, Eclipse sometimes loses track of things when you make changes to a project. You may have to use the "Clean Project" tool (under the "Project" menu.) If that doesn't work, you may have to close and restart Eclipse. Voo-doo solutions, but Eclipse can be that way.
src
folder and put a tick for rename subpackages
Here's how you could do this in Eclipse:
src/com.android.gesture.builder
).Refactor > Rename
and change the name, for example to
com.android.gestureNEW.builder
. <manifest>
tag, change the package name to com.android.gestureNEW.builder
. Activity
files and do Ctrl+Shift+O to add missing import packages, then save each file. GestureBuilder
application on the emulator.Link to post
Update super easy way right click on your project...
So, using IntelliJ with Android (Studio) plugin was: I went to AndroidManifest.xml
on top and changed package name by right-clicking -> Refactor -> rename.
Our then package name had four parts a.b.c.d
, the new one only a.b.c
.
So I renamed the first three. Then I went to the directory of generated sources (app\build\generated\source\r\development\debug\a\b\c\d
), right-clicked R
class and Refactor->Move[d] it to one package higher. Same with BuildConfig
in app\build\generated\source\buildConfig\development\debug\a\b\c\d
.
By using Refactor->Move, IntelliJ updates all references to BuildConfig
and R
.
Finally I updated all applicationId[s] I found in gradle.build I found. I hit Clean Project, Make and Rebuild Project. Deleted the app from my phone and hit "Play". It all worked out so refactoring was easy and quite fast.
I just lost few hours trying all solutions. I was sure, problem is in my code - apk starting but some errors when working with different classes and activities.
Only way working with my project:
For me it works, only solution.