Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google play services 8.4.0 - classes.jar not found - android studio

I am getting this error when I Run or Debug the app but when I build or clean my project there are no errors. It sounds strange but I've wasted my 4-5 hours searching for this but nothing was helpful. Error:

Error:Execution failed for task ':app:compileDebugJavaWithJavac'.> java.io.FileNotFoundException: C:\Users\Saeed Jassani\Downloads\AppName\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\8.4.0\jars\classes.jar (The system cannot find the path specified)

build.gradle file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
    applicationId "com.example.app"
    minSdkVersion 9
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:support-v4:23.1.1'
}
like image 536
Saeed Jassani Avatar asked Jan 15 '16 14:01

Saeed Jassani


2 Answers

You can fix this by using alpha6:

repositories {
    mavenCentral()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
}
like image 52
PHPedro Avatar answered Sep 28 '22 00:09

PHPedro


Clean your project and add following dependencies in your project level build.gradle file

    dependencies {

        classpath 'com.android.tools.build:gradle:2.0.0-alpha6'

        classpath 'com.google.gms:google-services:2.0.0-alpha6'

    }
like image 29
Anjul khanal Avatar answered Sep 28 '22 02:09

Anjul khanal