“找不到与给定名称匹配的资源:attr'android:keyboardNavigationCluster'”

时间:2017-12-07 17:30:10

标签: android android-studio gradle

我找到了这个问题的答案,我应该更改compileSdkVersion 26 buildToolVersion“26.0.1”

这有效,但我不想更改我的compileSdkVersion,因为这会导致我的应用程序出现许多问题,例如通知无效,而我的安装应用程序接收器也无法正常工作。

在更新Android Studio之前,它工作正常,但现在它给了我错误。

 buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}
repositories {
mavenCentral()
}
repositories {
jcenter() // includes the MoPub SDK and AVID library
maven { url "https://s3.amazonaws.com/moat-sdk-builds" }

}

android {
compileSdkVersion 25
buildToolsVersion "23.0.3"
defaultConfig {
    applicationId "com.frizza"
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 29
    versionName "3.8"
}

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
        proguardFile 'proguard-crashlytics.pro'
        proguardFile 'proguard-square-retrofit.pro'
        proguardFile 'proguard-square-picasso.pro'
        proguardFile 'proguard-square-okhttp.pro'
        proguardFile 'proguard-support-v7-appcompat.pro'
        proguardFile 'proguard-google-play-services.pro'
    }

}
android {
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude '.readme'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':SlidingMenu')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v13:25.3.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'

//    compile 'com.google.android.gms:play-services:8.4.0'
//    compile 'com.google.android.gms:play-services-gcm:7.5.0'
//    compile "com.google.android.gms:play-services-gcm:11.0.2"
compile 'com.google.android.gms:play-services-analytics:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.2'

compile "com.google.firebase:firebase-messaging:11.0.2"

compile 'com.facebook.android:facebook-android-sdk:[4,5)'

compile files('libs/assl_sdk_rmn.jar')

//// For interstitials 
//    compile('com.mopub:mopub-sdk-interstitial:4.16.1@aar') {
//        transitive = true 
//    }
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
    transitive = true;
}

}

apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:1)

setKeyboardNavigationClusterView或支持库API 26添加了compileSdkVersion

对于这两种情况,您需要将jsx更新为API 26。