Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
191 views
in Technique[技术] by (71.8m points)

android - 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:UsersTARUNDesktopGingerBudsgradlewrappergradle-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:UsersTARUNDesktopGingerbudsappuildintermediatesexploded-aarcom.google.android.gmsplay-services8.4.0jarsclasses.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'
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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'
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...