0

In android studio, i want to update my SDK version. I have updated to maximum and current max version is 25. But my supported libraries are of version 26.

 compile 'com.android.support:appcompat-v7:25.3.1'
 compile 'com.android.support.constraint:constraint-layout:1.0.2'
 testCompile 'junit:junit:4.12'
 compile 'com.android.support:design:26.0.0-alpha1'
 compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'

I am getting error in these lines. Please help me how to resolve this.

  • the current max is API 27, please go to documentation on support lib to get proper version. https://developer.android.com/topic/libraries/support-library/revisions.html – Viktor Yakunin Dec 01 '17 at 16:40
  • Build tools should be the same level, in case of buildToolsVersion '27.0.1' support lib version should be 27+ : e.g. "com.android.support:appcompat-v7:27.0.2" – Viktor Yakunin Dec 01 '17 at 16:42
  • maybe you have this issue https://stackoverflow.com/questions/46047943/how-do-i-use-the-latest-support-library-getting-failed-to-resolve-error-with-su?rq=1 – Viktor Yakunin Dec 01 '17 at 16:45

1 Answers1

0

If your library version is 26, then try this:

    implementation('com.android.support:appcompat-v7:26.1.0') {
        exclude group: 'com.android.support', module: 'animated-vector-drawable'
        exclude group: 'com.android.support', module: 'design'
        exclude group: 'com.android.support', module: 'recyclerview-v7'
    }
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation('com.android.support:design:26.1.0') {
        exclude group: 'com.android.support', module: 'animated-vector-drawable'
        exclude group: 'com.android.support', module: 'design'
        exclude group: 'com.android.support', module: 'recyclerview-v7'
    } 
    testCompile 'junit:junit:4.12'
Viktor Yakunin
  • 2,927
  • 3
  • 24
  • 39
Vihanga Yasith
  • 328
  • 5
  • 18