2016/09/07

Android Studio 2.2 - How to copy project

This is a quick summary of how to copy an Android Studio project.

1. Use the copy function of the system to make a complete copy of the folder that contains the project to be copied.

In the example below, I made a complete copy of the folder "AllIAskOfYou" and named the folder "AllIAskOfYou_v2"





2. Launch Android Studio and locate and open the copied project "AllIAskOfYou_v2".


3. Open "AndroidManifest.xml" and change the package name to the new name given to the copied project. In my case, it's "alliaskofyou_v2" so I change the package name to "wei_hsiunghuang.alliaskofyou_v2".


4. Right click on any one of the folder under "java" then select "Refactor" -> "Rename".


5. Click on "Rename package".


Enter the new name of the project. In my case, it's "alliaskofyou_v2". Then, click on "Refactor".


Click on "Do Refractor" to start the refactor process.


After it's done, click on "Sync Now" to synchronize the project.


6. Change the label of the App.


In my case, the new label is "All I Ask Of You v2".


7. Click on the "Run 'app'" icon to verify if everything is O.K. with the copied project.


If all goes well, the copied App. should perform as the original one. Now you have a copy of the original App. for adding new features / doing experiments, etc.

References:

Android - copy existing project with a new name

Android copy existing project with new name in Android Studio

Rename Refactorings



No comments:

Post a Comment