1

I m getting this issue while compiling android code in android studio 3.2 RC 2.. I have removed build folder, but results still same.

Android resource linking failed

Output:  /Users/jassi/Library/Mobile Documents/com~apple~CloudDocs/Documents/Documents – jaspreet’s MacBook Air/Projects/bolotalk-android-sdk/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:5657: error: style attribute 'attr/textColorError (aka com.BoloTalk:attr/textColorError)' not found.
            error: failed linking references.

        Command: /Users/jassi/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-rc02-4818971-osx.jar/f597d2f9b6d8fcd1de4112192ac94363/aapt2-3.2.0-rc02-4818971-osx/aapt2 link -I\
                /Users/jassi/Library/Android/sdk/platforms/android-28/android.jar\
                --manifest\
                /Users/jassi/Library/Mobile Documents/com~apple~CloudDocs/Documents/Documents – jaspreet’s MacBook Air/Projects/bolotalk-android-sdk/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
                -o\
                /Users/jassi/Library/Mobile Documents/com~apple~CloudDocs/Documents/Documents – jaspreet’s MacBook Air/Projects/bolotalk-android-sdk/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
                -R\
                @/Users/jassi/Library/Mobile Documents/com~apple~CloudDocs/Documents/Documents – jaspreet’s MacBook Air/Projects/bolotalk-android-sdk/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
                --auto-add-overlay\
                --java\
                /Users/jassi/Library/Mobile Documents/com~apple~CloudDocs/Documents/Documents – jaspreet’s MacBook Air/Projects/bolotalk-android-sdk/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
                --custom-package\
                com.BoloTalk\
                -0\
                apk\
                --output-text-symbols\
                /Users/jassi/Library/Mobile Documents/com~apple~CloudDocs/Documents/Documents – jaspreet’s MacBook Air/Projects/bolotalk-android-sdk/app/build/intermediates/symbols/debug/R.txt\
                --no-version-vectors
        Daemon:  AAPT2 aapt2-3.2.0-rc02-4818971-osx Daemon #0

Below is my build.gradle file:

    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'

    android {
        signingConfigs {
            android {
                keyAlias 'android'
                keyPassword 'android'
                storeFile file('/Users/jaspreet/Documents/Projects/bolotalk-android-sdk/keystoreGoogle')
                storePassword 'android'
            }
        }
        compileSdkVersion 28
        defaultConfig {
            applicationId "com.BoloTalk"
            minSdkVersion 21
            targetSdkVersion 28
            versionCode 43
            versionName "43"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            signingConfig signingConfigs.android
            multiDexEnabled true
        }
        dataBinding {
            enabled = true
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                signingConfig signingConfigs.android
                debuggable false
            }
        }
        lintOptions {
            checkReleaseBuilds false
            // Or, if you prefer, you can continue to check for errors in release builds,
            // but continue the build even when errors are found:
            abortOnError false
        }
        productFlavors {
        }
    //    compileOptions {
    //        sourceCompatibility = '1.8'
    //        targetCompatibility = '1.8'
    //    }
        buildToolsVersion '28.0.2'

        configurations.all {
            resolutionStrategy {
                force 'com.android.support:support-v4:27.1.0'
            }}

        configurations {
            all*.exclude group: 'com.android.support', module: 'support-v13'
        }
        configurations.all {
            resolutionStrategy.force 'com.android.support:support-v4:24.0.0'
        }

    }


    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'com.android.support:design:28.0.0-rc01'
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
        implementation 'com.android.support.constraint:constraint-layout:1.1.2'
        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'
        //room library
        implementation 'android.arch.persistence.room:runtime:1.0.0'
        annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
        implementation 'com.github.adroitandroid:ChipCloud:2.2.1'
        implementation 'com.github.bumptech.glide:glide:4.1.1'
        implementation 'com.github.nkzawa:socket.io-client:0.3.0'
        implementation 'com.wdullaer:materialdatetimepicker:3.3.0'
        implementation 'com.google.dagger:dagger:2.9'
        annotationProcessor "com.google.dagger:dagger-compiler:2.9"
        compileOnly 'javax.annotation:jsr250-api:1.0'
        implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
        implementation 'de.hdodenhof:circleimageview:2.1.0'
        implementation 'com.squareup.retrofit2:retrofit:2.3.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
        implementation 'com.jakewharton.rxbinding:rxbinding:0.4.0'
        //
        implementation 'org.greenrobot:eventbus:3.1.1'
        implementation 'com.google.firebase:firebase-invites:16.0.3'
        implementation 'com.google.firebase:firebase-core:16.0.3'
        implementation 'com.google.firebase:firebase-messaging:17.3.0'
        implementation 'com.google.android.gms:play-services-auth:15.0.1'
        //
        implementation 'com.braintreepayments.api:drop-in:3.0.1'
        implementation 'com.github.onurkagan:ktoast:1.0.2'
        implementation 'com.android.billingclient:billing:1.0'
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        // implementation 'androidx.multidex:multidex:2.0.0'
    }
    apply plugin: 'com.google.gms.google-services'
    repositories {
        mavenCentral()
    }
Faysal Ahmed
  • 7,501
  • 5
  • 28
  • 50
jaspreet Singh
  • 298
  • 1
  • 3
  • 16

1 Answers1

1

Try to use target and compile SDK 27 instead of 28. Because of 28 version still, have some issue.

targetSdkVersion 27
compileSdkVersion 27
buildToolsVersion '27.0.3'

and use 27.1.1 for all support version instead of 28.0.0-rc01.

Faysal Ahmed
  • 7,501
  • 5
  • 28
  • 50