简体   繁体   中英

issue renaming package in android studio

I'm trying to rename my app package name in android studio because when I try to upload to google play it says prefix "com.example" is reserved. So I've been to manifest file - double click in "example" and then refractor this, changed to "myapps" and changed it in the whole project. Now I try to upload it and I still get the same error message. Anybody knows how to fix this error ? Many thanks in advance

It seems simple. There are many ways from which one is this:

After you change the name manually in the AndroidManifest.xml , you click on the R.java class and then press F6.

R.java resides in the app/build/generated/source/r/debug/(packagename) directory. It contains resource IDs for the things you use in the android app. Check this question for more information.

Also, Amir is right, try to use a more unique package name. Example: com.(familyname) or your company domain.

For further information, you can visit this question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM