I have made an app and it is my very first app so when I started coding, I left the package name as com.example.stuff and now when I try to upload to the play store it wont let me due to the package name. I have tried refactor-> rename the package name and changed it in the AndroidManifst.xml then I tried to upload again. I am once again left with the same message time after time.
I appreciate any help and thanks in advance. :)
It can be done very easily in one step. You don't have to touch AndroidManifest. Instead do the following:
Another good method is: First create a new package with the desired name by right clicking on the java folder -> new -> package.
Then, select and drag all your classes to the new package. Android Studio will refactor the package name everywhere.
Finally, delete the old package.
or Look into this post
In projects that use the Gradle build system, what you want to change is the
applicationId
in the build.gradle file. The build system uses this value to override anything specified by hand in the manifest file when it does the manifest merge and build.For example, your module's build.gradle file looks something like this:
applicationId
is the name the build system uses for the property that eventually gets written to thepackage
attribute of themanifest
tag in the manifest file. It was renamed to prevent confusion with the Java package name (which you have also tried to modify), which has nothing to do with it.First click once on your package and then click setting icon on Android Studio.
Close/Unselect Compact Empty Middle Packages
Then, right click your package and rename it.
Thats all.