1

Yes, there are a million and one of this question but non has helped me. I have invalidated cache a million times, yet no solution. I have downgraded gradle version, yet it continues to appear.

Here is my gradle file (module:app)

apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
    applicationId "com.mtechcomm.nanocreditnative"
    minSdkVersion 19
    targetSdkVersion 29
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.0.0'

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'

implementation 'com.android.support:multidex:1.0.3'
implementation 'com.github.IslamKhSh:CardSlider:0.4'
implementation 'androidx.multidex:multidex:2.0.1'


implementation project(':lenddodatasdk')

}

// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'

Here is my gradle file (module:project)

// Top-level build file where you can add configuration options common to all sub-projects/modules.


}
dependencies {
    classpath 'com.android.tools.build:gradle:3.5.3'
    classpath 'com.google.gms:google-services:4.3.2'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

} allprojects {

repositories {

    google()

    jcenter()

    maven { url 'https://jitpack.io' }

}


}

task clean(type: Delete) {

delete rootProject.buildDir
}

2 Answers 2

1

inside appConfig include

subprojects {
    afterEvaluate {
        project ->
            if (project.hasProperty("android")) {
                android {
                    compileSdkVersion = 29
                    buildToolsVersion = "29.0.3"
                }
            }
    }
}

I struggled a whole day to resolve this and found it in here https://github.com/luggit/react-native-config/issues/299#issuecomment-431994106

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

Comments

0

Use the below code.. I think You are missing the "?"

android:textColor = "?attr/colorError"

Please up vote if it worked.

And also if you are using custom attributes, then you should define them in a new attribute file.. If that is the case, Google how to it. You will find lot of examples.. Please up vote if anything worked.

Good Luck

Edit Then remove the android part

android:?attr/colorError

And try like below

?attr/colorError

Another possible thing is you are overriding base theme and not setting the theme in the activity on create. Without looking the theme file and manifest cannot say correctly.. If you can post manifest and styles.xml file for a while, I can take a look at it.

3 Comments

I wasn't missing anything, here is what I have <item name="colorError">?android:attr/colorError</item>
@Gordons Why are you defining color error again.. It will automatically inherit from the parent theme.. Just remove that line and try again. Remove only that line
I didn't define it, that line is from the theme. Unfortunately that's where the error is pointing to. The line is from this file: .gradle\caches\transforms-2\files-2.1\7df26908078c74ff4eeaf46e7b6b476c\appcompat-1.0.0\res\values-v26\values-v26.xml:13:

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.