Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build tools update breaks my compile

I updated Android Studio 2.0 Preview from 4 to 5 this morning. If I continue to build with:

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

this will still compile successfully. But if I move up to -alpha5 I get this error:

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

like image 627
KairisCharm Avatar asked Dec 05 '22 19:12

KairisCharm


1 Answers

From now on, I think Google expects us to not use this:

'com.google.android.gms:play-services:8.4.0'

But rather add the services you need specifically. Find a list of them here

compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.google.android.gms:play-services-appinvite:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'
compile 'com.google.android.gms:play-services-drive:8.4.0'

Also, you need to apply play service plugin in last line of your application's gradle:

apply plugin: 'com.google.gms.google-services'
like image 118
Shawn Thye Avatar answered Dec 10 '22 13:12

Shawn Thye