To improve development efficiency, it is sometimes necessary to use some of the existing open source projects to document the way you modify the project name and package name.
1. First, modify the package name (found in the manifest file),
① Expand All Packages
② Select the package you want to modify, Shift+f6 (can also right-click Refactor+rename) to make changes, don't forget to do refactor below
③ wait for renaming, run the app, found an error, because there are still files import the old package name, then right-click on project Find in Path, the whole project to find the old package name, modify, and then clean + Rebuild project;
④ if the error is still as follows,
Error:execution failed for task ': App:compiledebugaidl '.
> java.lang.RuntimeException:com.android.ide.common.process.ProcessException: Org.gradle.process.internal.ExecException:Process ' command ' D:\develop\sdk\build-tools\23.0.3\aidl.exe ' finished With Non-zero exit value 1
So take a look at the import portion of your Aidl file, which is probably it. Modified clean + Rebuild Project,ok to complete the package name modification
2. Modify the project name, go directly to the folder to modify
Synchronization of the project, found that the project disappeared, a small after the appearance of a shell (because the Gradle file exists, will automatically generate a);
Then, File->open Select the modified item and turn off the first empty project interface.
Uninstall the app on the simulator and run the app again, if also reported is wrong,
Select Invalidate and Restart.
OK, to change the project name and package name is complete!
Android Studio modifies the project name and package name