I'm trying to run a project with the Android Studio 0.8.0 beta and the latest tools, it requires API 20, so it fails to run on the device with API 19
Any ideas?
In the Properties window, select the "Android" properties group at left and locate the Library properties at right. Select /path/to/appcompat/ and Click Remove. Click Add to open the Project Selection dialog. From the list of available library projects, select v7 appcompat library and click OK.
We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to AndroidX as well. So all Android apps should now aim to use AndroidX, instead of the old support library.
v7 appcompat library Part of Android Jetpack. This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations.
The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level.
If you configured your gradle settings to compile the latest version of
then the RC will be downloaded, which requires the L - Preview.
See the Answers here.
Use
everywhere in your project instead.
The problem still arises with transitive dependencies. Gradle offers a way to force the usage of a specific version of a dependency.
For example you can add something like:
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:20.+'
force 'com.android.support:appcompat-v7:20.+'
}
}
to your build.gradle.
If you want to learn more about gradle resolution strategies refer to this guide http://www.gradle.org/docs/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html
I found this while reading the corresponding issue which I will link here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With