AAPT:错误:找不到资源 android:attr/color错误,找不到样式属性"android:attr/keyboardNavigationCluster"



是的,有一百万个,其中一个问题,但没有帮助我。我已经使缓存失效了一百万次,但没有解决方案。我已经降级了gradle版本,但它继续出现。

这是我的 gradle 文件 (模块:应用程序(

apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.mtechcomm.nanocreditnative"
minSdkVersion 19
targetSdkVersion 29
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.github.IslamKhSh:CardSlider:0.4'
implementation 'androidx.multidex:multidex:2.0.1'

implementation project(':lenddodatasdk')

}

// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'

这是我的 gradle 文件(模块:项目(

// Top-level build file where you can add configuration options common to all sub-projects/modules.

}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

} 所有项目 {

repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}

}
task clean(type: Delete) {
delete rootProject.buildDir
}

在 appConfig 中包括

subprojects {
afterEvaluate {
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion = 29
buildToolsVersion = "29.0.3"
}
}
}
}

我花了一整天的时间解决这个问题,并在这里找到了它 https://github.com/luggit/react-native-config/issues/299#issuecomment-431994106

使用以下代码。我认为您缺少"?

android:textColor = "?attr/colorError"

如果它有效,请投票。

此外,如果您使用的是自定义属性,则应在新的属性文件中定义它们。 如果是这样的话,谷歌怎么做。你会发现很多例子。 如果有任何工作,请投票。

祝你好运

编辑 然后删除安卓部分

android:?attr/colorError

并尝试如下

?attr/colorError

另一个可能的事情是您正在覆盖基本主题,而不是在创建时在活动中设置主题。 不看主题文件和清单就不能正确说出来。. 如果你可以发布清单和样式.xml文件一段时间,我可以看看它。

最新更新