4

After updating and restart android studio ,I am getting below error.

Error:Execution failed for task ':app:compileDebugJavaWithJavac'. java.io.FileNotFoundException: /.../Workspace/MyAppName/app/build/intermediates/exploded-aar/com.google.android.gms/play-services/8.3.0/jars/classes.jar (No such file or directory)

I already tried to clean and rebuild my project but every time I am getting above error.

EDITS:

My gradle is as below:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.google.android.gms:play-services:8.4.0'
 }
pRaNaY
  • 24,642
  • 24
  • 96
  • 146

3 Answers3

8

There is a bug in Instant run and it has been fixed as per tools android site.

enter image description here

Solution:

Upgrade build tools build gradle version with alpha6.

dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
}
Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
  • 1
    Thanks. It's work like charm! can I see link of bugs list? – pRaNaY Jan 27 '16 at 05:17
  • Not Working ....Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > java.io.FileNotFoundException: /opt/schoolerp_android/app/libs/httpclient-4.2.jar (No such file or directory) – Amitsharma Sep 13 '16 at 09:41
  • When tried to build gradle it says: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to: "..." – Camilo Ortegón Sep 28 '16 at 02:24
0

Add code in your build gradle file.Because you may missed com.google.android.gms/play-services update library files so that FileNotFoundException occur.

   dependencies {
     classpath 'com.android.tools.build:gradle:1.5.0'
     classpath 'com.google.gms:google-services:2.0.0-alpha2'
    }
 //then complie 
   compile 'com.google.android.gms:play-services:8.3.0'
sasikumar
  • 12,540
  • 3
  • 28
  • 48
0

Please disable the instant run.

On a mac go to Preferences Navigate to Build, Execution, Deployment > Instant Run.

Uncheck the box next to Restart activity on code changes

That did the trick for me.

Subhasmith Thapa
  • 884
  • 7
  • 11