I am trying to upload my finished android app to the android market and I am getting this error:
You need to use a different package name because "com.example" is restricted.
The package name is the identitiy of the application. To rename the package name, In eclipse right click on the project in project explorer. Then Android Tools > rename Aplication Package name. Then enter the new package name.
Step 1: To rename package name in Android studio open your project in Android mode first as shown in the below image. 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.
To change the Application ID in Android, open the the android/app/build. gradle file and configure the Application ID to applicationId in defaultConfig section. defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
In Android Studio after renaming Package then go "build.gradle (Module:App)
defaultConfig { applicationId "com.example.android.abc" minSdkVersion 9 targetSdkVersion 22 versionCode 1 versionName "1.0" }
change the line
applicationId "com.example.android.abc"
to
applicationId "com.tanxe.android.abc"
relpace "tanxe" with the word you want or your Organization name i.e.
your new package name and rebuild the project
The best way to solve this is by going to the AndroidManifest.xml: package="com.example.android.yts"
Cursor on example
press
Shift+f6
change Package name eg. example to boss Click on refactor now `"com.boss.android.yts"``
2nd thing
open build.gradle (module:app) change applicationId "com.example.android.yts"
to "com.boss.android.yts"
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