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 throughout the files, it gives me tons of errors.
What's the proper way to change the application name?
I would recommend unpacking the apk with apktool, and then edit the apktool. yml, setting renameManifestPackage to the new package name. Then when you rebuild the apk with apktool, it should use aapt's --rename-manifest-package functionality to change the package name.
In the Pop-up dialog, click on Rename Package instead of Rename Directory. Enter the new name and hit Refactor. Click Do Refactor in the bottom. Allow a minute to let Android Studio update all changes.
Step by Step Implementation Step 2: Now click on the setting gear icon and deselect Compact Middle Packages. Step 3: Now the packages folder is broken into parts as shown in the below image. Step 4: Now right-click on the first package name (com) and Refactor > Rename.
From Dianne Hackborn: Things That Cannot Change: The most obvious and visible of these is the “manifest package name,” the unique name you give to your application in its AndroidManifest.
There is a way to change the package name easily in Eclipse. Right click on your project, scroll down to Android Tools, and then click on Rename Application Package.
If you're using Eclipse, you could try these instructions from Android's developer site. They're specifically for the GestureBuilder sample but should apply to any application as far as I can tell:
[H]ere's how you could do this in Eclipse:
- Right-click on the package name (
src/com.android.gesture.builder
).- Select Refactor > Rename and change the name, for example to
com.android.gestureNEW.builder
.- Open the manifest file. Inside the
<manifest>
tag, change the package name tocom.android.gestureNEW.builder
.- Open each of the two Activity files and do Ctrl-Shift-O to add missing import packages, then save each file. Run the GestureBuilder application on the emulator.
Also, be sure you remembered to rename the package itself along with the references to it in the files. In Eclipse you can see the name of the package in the file explorer window/tree view on the left hand side. In my experience, Eclipse can sometimes be a little finnicky and unreliable with this (leaving behind stray references to the old package name, for example).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With