1

Opened a project I haven't touched in like two months to make a slight update and after updating Android Studio I am not able to compile the code without the following error.

I have been googling this for the past two hours and cannot resolve it. I have tried pretty much everything in the other similar threads including changing my compileSdkVersion to 28 amongst others.

Full error message:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  Output:  C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:605: error: resource android:attr/fontVariationSettings not found.
  C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:605: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

  Command: C:\Users\nicoq\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\79758b877cdc4acd10a4d36cead9740a\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          C:\Users\nicoq\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
          --manifest\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.nicoqueijo.android.currencyconverter\
          -0\
          apk\
          --output-text-symbols\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
  Output:  C:\Users\nicoq\.gradle\caches\transforms-1\files-1.1\appcompat-1.0.0.aar\35842d61ee1e0b491406c4ed516cc97e\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

  C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.

  C:\Users\nicoq\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\61e0e551f80e7289ee3f340454bf1394\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.

  C:\Users\nicoq\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\61e0e551f80e7289ee3f340454bf1394\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.

  error: failed linking references.
  Command: C:\Users\nicoq\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\79758b877cdc4acd10a4d36cead9740a\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          C:\Users\nicoq\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
          --manifest\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.nicoqueijo.android.currencyconverter\
          -0\
          apk\
          --output-text-symbols\
          C:\Users\nicoq\AndroidStudioProjects\CurrencyConverter\app\build\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

My build.gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.nicoqueijo.android.currencyconverter"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 4
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        disable 'MissingTranslation'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.volley:volley:1.1.0'
    implementation 'com.github.turing-tech:MaterialScrollBar:13.+'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.github.bosphere.android-fadingedgelayout:fadingedgelayout:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

1 Answer 1

2

Maybe problem in

implementation 'com.github.turing-tech:MaterialScrollBar:13.+'

I go to github and look to this lib build gradle file:

    def libVersion = '13.3.2'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28
        versionName libVersion
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

i see

buildToolsVersion '28.0.3'

but in you project:

27.1.1

Try to set more older version for lib, just add

implementation 'com.github.turing-tech:MaterialScrollBar:13.3.0'

instead this

implementation 'com.github.turing-tech:MaterialScrollBar:13.+'

Sign up to request clarification or add additional context in comments.

2 Comments

That was it! You're a life-saver! Thank you!
@Nico no problem)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.