Search code examples
androidbuilding

Build failed due to V28 elements but target is v26


I'm trying to create a project for V26 but when I build, I get errors telling me that V28 elements are causing problems.

C:\Users\XXX\.gradle\caches\transforms-2\files-2.1\f6a183f8595ca34f3d5cc99d1f8bc322\appcompat-1.0.2\res\values-v28\values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found

There is no reference to the dialogCornerRadius in the project or v28. Thanks


Solution

  • may be you used depedencies without specifying proper version.

    so change all depedencies like this

     implementation 'com.android.support:design:+'
    

    with proper version like this

     implementation 'com.android.support:design:26.1.0'
    

    other option is to set compileSdkVersion 28 and add two lines to gradle.properties:

    android.useAndroidX=true
    android.enableJetifier=true