Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"com.example is restricted" when uploading APK to Play Store

Tags:

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. 
like image 432
Mike Avatar asked Jul 01 '13 03:07

Mike


People also ask

How do you fix 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.

Can I change package name Android?

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.

How do I change my application ID in flutter?

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).


2 Answers

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

like image 59
Muhammad Akhtar Avatar answered Oct 21 '22 07:10

Muhammad Akhtar


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"

like image 27
Tarsbir Singh Avatar answered Oct 21 '22 07:10

Tarsbir Singh