53

I'm getting following error in my project with Android Studio 2.0 preview 5 and gradle plugin 1.5.0. Even clean project throws the same error.

EtaskArtifacts.bin .gradle/2.11/taskArtifacts/taskArtifacts.bin). > rror:Could not read entry ':app:processDebugManifest' from cache taskArtifacts.bin (/PROJECT_PATH/.gradle/2.10/taskArtifacts/taskArtifacts.bin).
enum constant INSTANT_RUN_REPLACEMENT does not exist in class com.android.manifmerger.ManifestMerger2$Invoker$Feature

JJD
  • 50,076
  • 60
  • 203
  • 339
jimmy0251
  • 16,293
  • 10
  • 36
  • 39

7 Answers7

142

Edit : The issue is already fixed, please upgrade to latest version of Android Studio, you can track the issue here.

I found a simple solution. Just delete ProjectDirectory/.gradle/taskArtifacts.bin file and restart Android Studio.

jimmy0251
  • 16,293
  • 10
  • 36
  • 39
14

Here are the steps for fixing this

  1. Go to your Run/Debug configuration
  2. Select Edit Configuration....
  3. On General tab you might be getting red warning to Update Project.
  4. Click on it, it will handle handle rest.

enter image description here

Abhishek Patidar
  • 1,557
  • 1
  • 16
  • 25
5

Just go to your workbench directory. Navigate to your ProjectFolder and then delete the .gradle folder. Then rebuild your project!

Jethro
  • 928
  • 1
  • 10
  • 20
2

Open terminal and run this line code to solve this problem:

rm .gradle/2.10/taskArtifacts/taskArtifacts.bin
Carson
  • 17,073
  • 19
  • 66
  • 87
DaoLQ
  • 988
  • 1
  • 6
  • 13
1

This morning i had the same problem. The steps that worked for me are:

  • "Invalidate Cache and Restart" on Android Studio.
  • Click on "Run app"
  • Android Studio show you a dialog to update gradle

I hope this helps you

jam0ral3s
  • 534
  • 4
  • 9
1

Open your_app/build.gradle file, and modify the compile dependecy in my case com.google.gms:google-services:2.0.0-alpha3 was changed by com.google.gms:google-services:2.0.0-alpha5

my_app/build.gradle not module my_app/app/build.gradle

0

Switching to gradle 2.0.0-alpha5 would probably fix that but in my case that causes build times of over 30 minutes and other significant issues.

draekko
  • 151
  • 2
  • 5
  • Are you aware there is also alpha6? – gbhall Jan 19 '16 at 14:42
  • @gbhall AS only offers me alpha5 with preview-5. Setting it manually installed it but still had the same issues. Switching back to gradle plugin 2.8 and 1.3.1 helped some but not as much as i was hoping, definitely nowhere near the compile times i had prior to this mess starting up. – draekko Jan 20 '16 at 13:43
  • I had to switch back to alpha3 too. Currently helping Google with another bug report I have. – gbhall Jan 20 '16 at 14:14
  • try some of the suggestions in here https://stackoverflow.com/questions/30817871/android-studio-is-too-slow they helped with AS 1.5.1 gradle 2.8, 1.3.1 as it brought 18min compile time down to 3min. Going to try that tomorrow with preview-5 and the latest alpha. Also enabled offline setting for gradle before i forget. Oh and it also made the UI usable again. – draekko Jan 21 '16 at 01:22