1

I use Android Studio3.2. I create a project use api version 28. Now I need change api version to 23. So I edit build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    defaultConfig {
        applicationId "com.example.administrator.myapplication"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags ""
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3'
}

And I change "AppCompatActivity" to "Activity"

But building faild:

Android resource linking failed
Output:  error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
.............................
Getname
  • 78
  • 8
  • Hi @Getname, for this you should add the material support like compile 'com.android.support:support-v4:23.x.x' – Vijaya Varma Lanke Oct 08 '18 at 12:12
  • I think you also need to downgrade your dependencies in gradle like constraintlayout, etc. – Yasir Ghafar Oct 08 '18 at 12:16
  • thank you @Varma but how add the material support? – Getname Oct 08 '18 at 12:59
  • thank you @Yasir but how to downgrade dependencies? I try change implementation 'androidx.constraintlayout:constraintlayout:1.1.2' to implementation 'androidx.constraintlayout:constraintlayout:1.1.0' this not work – Getname Oct 08 '18 at 13:04

2 Answers2

0

Try to look inside you XML for a view that has style type mentioned in that error.

Also, try to go File/ InvalidateCaches

0

compileSdkVersion and targetSdkVersion should match and apart from that

you have to include the following support library to support api 23

implementation 'com.android.support:appcompat-v7:23.0.0'

then now sync project and check.

Hope this will help

Vijaya Varma Lanke
  • 603
  • 2
  • 7
  • 19