Android Studio Copy Module

I am trying to make a copy of a module in Android Studio to make small changes. How can i do this? I found several solutions, but it didn’t work for me. Instead of posting my questions on a few old topics, I decided to open a new question.

I made a copy of the modules directory, changed the folder name, and edited the package name in the manifest. Now I'm stuck: how can I automatically change the package in all files and create an Android working project again? I tried to select a package and reorganize it, but this will only change the package in the manifest or in the project tree, but not in the java files.

Thanks!

+5
source share
1 answer

I just copied / pasted it from Android Studio and it worked for me:

  • In Android Studio, make sure that Project is selected for the Project panel.
  • Select the module and copy.
  • Select the folder name of your project in the Project panel (this should be the name of your project and the parent directory for the module).
  • Insert it (it will ask you to rename it).
  • Add a new module to the settings.gradle file.

    enable 'old-module', "new-module"

  • Rebuild / synchronize the project (now you should see another module)

  • Launch on your device / emulator.
+8
source

All Articles