android - “No resource found that matches the given name: attr ' android:keyboardNavigationCluster '”

标签 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'

最佳答案

好像API 26中添加了setKeyboardNavigationCluster作为View或支持库v26.0.1

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

关于android - “No resource found that matches the given name: attr ' android:keyboardNavigationCluster '”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47700609/

相关文章:

android - 无法在模拟器中启动 AVD :QT library not found

android - Gradle 同步失败 : Could not find com. android.tools.build :gradle-experimental:3. 3.2

Android Studio 3.0,AAPT2 编译失败 - 资源文件中的无效维度

java - 放弃音频焦点并继续之前的音乐/视频流

java - 本地通知引发SecurityException

android - 适用于 Android Studio 的 Google Play 服务版本

gradle - Gradle将发布从Gradle 4.x迁移到5.x?

android - NoClassDefFoundError - Android 2.3.X

android - 如何在 Android Wear 中检测省电模式?

java - Android Studio 项目移动到其他文件夹后被删除