EGHDK EGHDK - 1 year ago 94
Android Question

My Android Studio project keeps running my old project/application

I had an Android Studio project I created. The project was named App2-1. After I was done with that project I wanted to move onto my next project named App2-2 that is based off of App2-1. I copied and pasted the directory containing my project "App2-1" and named the new directory "App2-2". Then I opened up the directory using open project in Android Studio. No errors or anything. I made a whole bunch of changes and then I ran the app and it keeps opening my old app. Almost like it has a reference to it or something. Ideas?

Things I've tried:

  • Restarting Android Studio

  • Invalidating caches/Restart in AS

  • Restarted my emulator

  • Uninstalled my app from emulator/Clean install

  • Tried a physical device

I'm guessing my workflow of creating a new project based on an old project was incorrect. Appreciate any tips.

Answer Source

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

  • .iml file
  • .gradle folder
  • .idea folder
  • build folder

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

You might have to check the dependencies and re-build but hopefully this should set things up in AS from scratch.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download