Android Studio compile error : enum constant INSTANT_RUN_REPLACEMENT does not exist in class
AndroidAndroid StudioGradleAndroid Problem Overview
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
Android Solutions
Solution 1 - Android
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.
Solution 2 - Android
Here are the steps for fixing this
- Go to your
Run/Debug configuration
- Select
Edit Configuration...
. - On General tab you might be getting red warning to
Update Project
. - Click on it, it will handle handle rest.
Solution 3 - Android
Just go to your workbench
directory. Navigate to your ProjectFolder
and then delete
the .gradle
folder.
Then rebuild your project!
Solution 4 - Android
Open terminal
and run this line code to solve this problem:
rm .gradle/2.10/taskArtifacts/taskArtifacts.bin
Solution 5 - Android
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
Solution 6 - Android
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
Solution 7 - Android
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.