“com.example is restricted” when uploading APK to Play Store

前端 未结 5 1507
悲&欢浪女
悲&欢浪女 2020-12-09 10:32

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


        
相关标签:
5条回答
  • 2020-12-09 10:37

    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"

    0 讨论(0)
  • 2020-12-09 10:41

    Write something else than the com.example

    for ex: com.gg.s etc will do(make that onj your name/firm name)

    0 讨论(0)
  • 2020-12-09 10:42

    The error message is telling it all. You need to use a package name of your own. 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.

    Also make sure that you are trying to upload a release build

    0 讨论(0)
  • 2020-12-09 10:46

    Yes, com.example is the default package name for Android applications and is, as such, just a placeholder. You should replace it by a unique package name before uploading it to the Google Play Store. It doesn't particularly matter what it is, but it should relate to your application, cannot match any existing package name (so picking someone else's package name like com.android is not a good idea), and cannot be changed after publishing.

    0 讨论(0)
  • 2020-12-09 10:52

    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

    0 讨论(0)
提交回复
热议问题