AAPT: error: resource android:attr/colorError not found.

AS报错:

AAPT: error: resource android:attr/colorError not found.

解决办法:
build.gradle设置成如下:

apply plugin: 'com.android.application'

android {
    
    
    compileSdkVersion 26
    buildToolsVersion "29.0.2"

    defaultConfig {
    
    
        applicationId "com.lgl.answersystem"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
    }

后又报错:

AAPT: error: resource android:attr/dialogCornerRadius not found.

解决办法:

apply plugin: 'com.android.application'

android {
    
    
    compileSdkVersion 28
    buildToolsVersion "29.0.2"

    defaultConfig {
    
    
        applicationId "com.lgl.answersystem"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }

猜你喜欢

转载自blog.csdn.net/weixin_47542175/article/details/115036660
今日推荐