I was using 25
as targetSdkVersion
,compileSdkVersion
in my project. Then a warning showed up.
Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
So I raised it to 26
. And I opened my SDK Manager
and updated everything:
SDK Tools , SDK Platform-Tools
, etc.
Then another warning showed up:
This support library should not use a lower version (25) than the
targetSdkVersion
(26)
I was using this version:
compile 'com.android.support:appcompat-v7:25.3.1'
Now I don't know to which version exactly should I change to.
I tried 7:26.0.0
which my SDK Platform-Tools
version is now.
I tried 7:26.0.2
which my SDK Tools
version is now.
Both of them give me error after sync:
Failed to resolve: com.android.support.appcompat-v7:26.0.2
Install repository and sync project
Then if I click on Install
nothing will happen
Now I have a simple question. How can I find out what is the latest version of support library?
Then another warning showed up:
This support library should not use a lower version (25) than the targetSdkVersion (26)
Now I don't know to wich version exactly should I change to.
Either one as you simply should have version match here, so either lower your targetSdkVersion
to 25
or use valid version for 26+ libs.
Error:(29, 13) Failed to resolve: com.android.support:cardview-v7:26.0.0 Install Repository and sync project
26 is not officially out yet so just RCs or betas, therefore valid version string is i.e. 26.0.0-beta1
.
Finally, you should check if your repository
includes new google maven repo, otherwise some artefacts will not be available for your project incl. recent betas of support libs.
See docs for details of setting it all up.
Add maven repository to your project gradle file:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
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