Android Studio compile error : enum constant INSTANT_RUN_REPLACEMENT does not exist in class

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


Solution 1:

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:

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