If you copy a project and want to work on the copy, you should rename and refactor the copy. In the following steps we assume the original project is called ExistingProject project and the copied project will be called NewProject. Here are the steps to refactor the project, replace your actual project names for ExistingProject and NewProject:
ExistingProject
folder to a new location and rename it NewProjectuk.aston.existingproject
and select Refactor > Rename. A Warning dialog is displayed. Select Rename package.newproject
.strings.xml
file.app_name
string value to New Project
.AndroidManifest.xml
and ensure that the package name has been refactored. The opening element should look like this:<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.aston.newproject">
build.gradle(Module: app)
and ensure that the applicatioId
has been renamed:defaultConfig {
applicationId "uk.aston.newproject"
settings.gradle(Project Settings)
and ensure that the rootProject.name
has been updated. That file should look like this:include ':app'
rootProject.name = "NewProject"
After you change the value of rootProject.name
, click Sync now which should appear at the top right hand corner of the Android Studio editor window.Here is an animate image of the above steps being followed in Unit 1.2a to copy and rename the "helloToast" project to "HelloToastChallenge" (if this image is too small, try right clicking the image and choose Open image in new tab):