Voora Tarun
Voora Tarun

Reputation: 1226

google play service error

I got this below error

Error:(1, 1) A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:\Users\TARUN\Desktop\GingerBuds\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip

Then I changed the above gradle path, Then following problem occurred,

I am getting this exception, while building my project . I rebuild and clean the project and updated google-play-services , then also i got error. can anyone please help me how to solve this.

Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
java.io.FileNotFoundException: C:\Users\TARUN\Desktop\Gingerbuds\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

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.kitchenvilla.gingerbuds"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 24
        versionName "1.2.2"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

android {
    useLibrary 'org.apache.http.legacy'
}
android {
    publishNonDefault true
}


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:recyclerview-v7:23.0.0'
    compile 'com.mcxiaoke.volley:library:1.0.15'
    compile 'org.apmem.tools:layouts:1.10@aar'
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
    compile 'com.google.android.gms:play-services-maps:8.4.0'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.android.support:support-v4:23.0.0'
    compile 'com.pkmmte.view:circularimageview:1.1'
    compile 'com.squareup.picasso:picasso:2.3.2'
    compile 'com.facebook.android:facebook-android-sdk:4.7.0'
}

Upvotes: 5

Views: 6592

Answers (5)

skapaid
skapaid

Reputation: 169

i tried to import admob ads to a new app i was making and i ran into this problem...... i found the solution the be the StartAppInApp file being located in the wrong spot or not being there..... my app needed the StartAppInApp-3.1.1.jar file to be located in the libs folder and when i looked at my app there was no libs folder located there at all .....

open your main app folder... then click app and you should have 3 folders.... src ... build.... and libs .....

in my case there was no libs folder..... so i created the libs folder and then went and copied the StartAppInApp-3.1.1.jar file from a different android project i had and i pasted it to the new libs folder i made in my current project... the error is now GONE!

i also made sure to include

compile files('libs/StartAppInApp-3.1.1.jar')

in the dependencies of my app gradle file

not sure if this is a solid answer but if anyone has this problem double check your StartAppInApp-3.1.1.jar location and version and check your gradle dependencies

Upvotes: 0

Osman Goni Nahid
Osman Goni Nahid

Reputation: 1279

update gradle version to alpha9 in project level gradle file

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

Upvotes: 0

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75798

This exception is thrown during a failed attempt to open the file denoted by a specified Path-name.

You can use

   compile 'com.google.android.gms:play-services:8.3.0'

Update your classpath

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

Upvotes: 3

ArL
ArL

Reputation: 313

This bug has been fixed according to Google dev blog: http://tools.android.com/tech-docs/new-build-system

2.0.0-alpha6 (2016/1/15)
Instant Run 
Fix alpha5 reported issues :
    - cannot build when importing play-services.

You should update android gradle tools version

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

Upvotes: 14

user987760
user987760

Reputation: 1081

this will solve it

dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
    classpath 'com.google.gms:google-services:2.0.0-alpha2'
}

and

compile 'com.google.android.gms:play-services:8.3.0'

Upvotes: 2

Related Questions