3

I Just upgraded android studio :

Android Studio 3.5
Build #AI-191.8026.42.35.5791312, built on August 9, 2019
JRE: 1.8.0_202-release-1483-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

I am getting the error:

11:35   Error running 'app': Default Activity not found

I tried all possible solutions like

  1. Invalidate caches restart
  2. clean and rebuild
  3. deleting cache folder of android studio
  4. Default activity is mentioned in manifest

I also tried solution in this questions, didn't work: https://stackoverflow.com/q/15825081/1083093

This was working before until I upgraded the android studio

user1506104
  • 6,554
  • 4
  • 71
  • 89
Devrath
  • 42,072
  • 54
  • 195
  • 297

4 Answers4

3

I have spend almost 5 hours and got the solution. I have copy that project and run in another system then its working fine, So just do following solution to fix this issue and it is work for me and i hope some one will get help with this. Solution :

Delete the cash from your %Home%\.gradle\cash and sync project again. Also check that is there any duplicate tag in your Manifest.

On Windows: %USER_HOME%\.gradle/caches/ On Mac/Unix: $HOME/.gradle/caches/

This issue was in android studio 3.2

Note: Android Studio's File | Invalidate Caches/Restart doesn't clear the Android build cache, so you'll have to clean it separately.

On Windows:

gradlew cleanBuildCache

On Mac or Linux:

./gradlew cleanBuildCache
Faizzy
  • 112
  • 7
1

I faced the same issues a few days ago. Below is what I'd done:

Delete all the files & folder under

  1. Project directory > .idea > libraries
  2. Project directory > .idea > caches
  3. Project directory > app > build

Make sure to close the AndroidStudio and delete all the files manually.

Rahul Khurana
  • 8,577
  • 7
  • 33
  • 60
0

This is what worked for me: I closed Android Studio and deleted C:\Users\<my-user-name>\.AndroidStudio3.5\system\caches directory.

Optionally, you might want to delete all the latest directories in here: C:\Users\<my-user-name>\.gradle\caches\transforms-1\files-1.1\.

user1506104
  • 6,554
  • 4
  • 71
  • 89
0

I tried:

  • Cleaning and rebuilding.
  • Invalidating caches and restarting.
  • Deleting cache folder of Android Studio

These way can not work for me.

I just removed all the code in the application label in the manifest file except for launcher activity and it worked!

Then you just revert your change.

double-beep
  • 5,031
  • 17
  • 33
  • 41
ArcherLucky
  • 27
  • 1
  • 5