简体   繁体   中英

Increase API level in Android when using compile ('com.google.android.gms:play-services:+')

I am using these dependencies and am unable to decrease the API level from 14 to 13 or lower:

dependencies {
    compile ('com.google.android.gms:play-services:+')
    compile files('libs/dagger-1.2.2.jar')
    compile files('libs/javax.inject-1.jar')
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/support-v4-19.0.1.jar')
    compile 'com.android.support:multidex:1.0.1'

How do you increase the API level in Android when using compile ('com.google.android.gms:play-services:+') ?

I'll refer to an answer i made to another post with a similar issue:

https://stackoverflow.com/a/42315590/2877453

Basically using the "+", you say you ALWAYS want the newest version, no matter what. You should never do this, as it'll lead to unforeseen issues, just like the one you're having now.

If you want to support lower than 14, you have to use older versions of all Google libraries.

So you'll have to replace the "+" with "10.0.1", as that's the newest version that still supports down to API 9.

When using "+", you'll get a version of "10.2" (or higher), and those only support down to API 14.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM