简体   繁体   中英

Android project R.java file

My question is if there is already a way to automate the creation of an app? For example a script that changes the package name in all necessary places? If that isn't possible I want to ask if there is a way to change the location of the generated R.java file?

You can't change the location of R.java file.

This is how you can rename your package name to all the places at one go.

  1. Go to AndroidManifest.xml .

  2. Put your cursor in the package name (don't select it).

  3. Press shift+F6 , you will get a popup window, select Rename package.

  4. Enter your new name and select Refactor.

Update: This is how you can rename the package name using an ant build, a ref to SO post

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