After upgrading my build tools to the latest versions (SDK Tools v23, Platform Tools v20, and Android Studio v0.8.1) I got the following error building my project:
uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1
This didn't make any sense to me since my project explicitly defines the support version to be 19.1.0 everywhere it is used.
I realized that a library I was including was actually requesting an unbounded version of the support library which resulted in the L preview version being included.
To fix this, I added the following:
compile ('name_of_library:0.9.9') {
exclude group: 'com.android.support', module:'support-v4'
}
Provided you include a version of the support library greater than or equal to the minimum version used by that library, everything should work fine.
To help identify the offending library, type the following:
./gradlew :your_project_name:dependencies
You'll get a handy spew output showing the dependencies of your project and what versions they all get mapped to.
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.