Error:(59, 8) error: cannot access ActivityCompatApi23 class file for android.support.v4.app.ActivityCompatApi23 not found

后端 未结 3 488
礼貌的吻别
礼貌的吻别 2021-01-06 08:12

This is my build.gradle

apply plugin: \'com.android.application\'


android {
    compileSdkVersion 25
    buildToolsVersion \"26.0.2\"
    android {
                


        
相关标签:
3条回答
  • 2021-01-06 08:56

    All support libraries need to be same version. If your compile SDK is 25,it's 25.3.0. If your compile SDK is 26, it's 26.0.0. Don't mix them

    this should fix your problem

      compile 'com.android.support:appcompat-v7:25.3.0'
      compile 'com.android.support:recyclerview-v7:25.3.0'
    
    0 讨论(0)
  • 2021-01-06 09:06

    I solved this problem by add this code in build.gradle

    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'com.android.support') {
                if (!requested.name.startsWith("multidex")) {
                    details.useVersion '25.3.0'
                }
            }
        }
    }
    
    0 讨论(0)
  • 2021-01-06 09:13

    I just changed the line

    compile 'com.android.support:appcompat-v7:26.0.0-alpha1'

    to

    compile 'com.android.support:appcompat-v7:26.+'
    
    0 讨论(0)
提交回复
热议问题