My Android Studio project supports starting my old project / application

I had an Android Studio project that I created. The project was named App2-1. After I finished this project, I wanted to move on to the next project called App2-2, based on App2-1. I copied and pasted the directory containing my project "App2-1", and named the new directory "App2-2". Then I opened the directory using an open project in Android Studio. There are no errors. I made a whole bunch of changes and then I started the application and it continues to open my old application. Almost like he has a link to him or something like that. Ideas?

Things I tried:

  • Restart Android Studio
  • Invalid Caches / Restarts in AS
  • Rebooting my emulator
  • Removed my application from the emulator / Clean install
  • Tried a physical device

I assume that my workflow for creating a new project based on an old project was wrong. Rate all the tips.

+7
source share
3 answers

I would make a copy of the project in a new folder and in this copy I will delete the following:

  • .iml file
  • .gradle folder
  • .idea folder
  • create a folder

then open Android Studio and select "File> Import Project ..." and select the new settings.gradle file and click "Open"

You may have to check dependencies and rebuild, but hopefully this should be all right with AS.

+9
source

For me, "Gradle -> Tasks -> others -> clean."

+1
source

There may be new functionality. It worked for me:

FileInvalidate Caches / RestartInvalidate and Restart

0
source

Source: https://habr.com/ru/post/1207680/


All Articles