Last Updated: May 01, 2016
·
17.87K
· rafaelcgo

Refactor and Rename a Android Studio Project or App

Changing from com.example.myapp to com.example.mynewapp

Create a NEW project on Android Studio

Go to your file manager
Copy /app/src/main/java/com/example/myapp to /app/src/main/java/com/example/mynewapp on the new project

From the OLD project to the NEW project
Replace /app/src/main/res
Copy /app/src/main/assets
Copy /app/libs
Replace /app/AndroidManifest.xml
Replace /app/build.gradle
Replace /build.gradle
Replace /gradle.properties
Replace /gradle/wrapper

Open the new project folder on Sublime Text.
Find "com.example.myapp"
Replace "com.example.mynewapp"

Open the new Project on Android Studio again.
Build -> Clean Project
Build -> Rebuild Project

Done!

References:
- https://medium.com/google-developers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd#.o2qyn2vfb
- https://www.youtube.com/watch?v=isr3zXK42po