user9244682
user9244682

Reputation:

Errors - Android Studio - Gradle Ask

I am getting these errors in Android Studio:

Error:(9, 5) error: style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
Error:(11, 5) error: style attribute 'attr/colorPrimary (aka com.kevinladelfa.duevent:attr/colorPrimary)' not found.
C:\Users\kevin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\55eaded1d173457b819b46407cb2076d\res\values-v26\values-v26.xml
Error:(11, 5) error: style attribute 'attr/colorAccent (aka com.kevinladelfa.duevent:attr/colorAccent)' not found.
Error:(11, 5) error: style attribute 'attr/colorPrimaryDark (aka com.kevinladelfa.duevent:attr/colorPrimaryDark)' not found.
C:\Users\kevin\.gradle\caches\transforms-1\files-1.1\cardview-v7-26.1.0.aar\c45ee84ab726285b089716ddfdae856c\res\values\values.xml
Error:(13, 5) error: style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
C:\Users\kevin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\55eaded1d173457b819b46407cb2076d\res\values-v17\values-v17.xml
Error:(27, 5) error: resource dimen/abc_dropdownitem_text_padding_left (aka com.kevinladelfa.duevent:dimen/abc_dropdownitem_text_padding_left) not found.
Error:resource style/Theme.AppCompat.Light.DarkActionBar (aka com.kevinladelfa.duevent:style/Theme.AppCompat.Light.DarkActionBar) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:(183) style attribute 'attr/colorPrimary (aka com.kevinladelfa.duevent:attr/colorPrimary)' not found.
Error:(184) style attribute 'attr/colorPrimaryDark (aka com.kevinladelfa.duevent:attr/colorPrimaryDark)' not found.
Error:(185) style attribute 'attr/colorAccent (aka com.kevinladelfa.duevent:attr/colorAccent)' not found.
Error:resource style/Base.Theme.AppCompat.Dialog.FixedSize (aka com.kevinladelfa.duevent:style/Base.Theme.AppCompat.Dialog.FixedSize) not found.
Error:resource style/Base.Theme.AppCompat.Light.Dialog.FixedSize (aka com.kevinladelfa.duevent:style/Base.Theme.AppCompat.Light.Dialog.FixedSize) not found.
Error:resource style/Base.V7.Widget.AppCompat.AutoCompleteTextView (aka com.kevinladelfa.duevent:style/Base.V7.Widget.AppCompat.AutoCompleteTextView) not found.
Error:resource style/Base.V7.Widget.AppCompat.EditText (aka com.kevinladelfa.duevent:style/Base.V7.Widget.AppCompat.EditText) not found.
Error:resource style/Base.V14.Widget.Design.AppBarLayout (aka com.kevinladelfa.duevent:style/Base.V14.Widget.Design.AppBarLayout) not found.
Error:resource style/Base.V23.Theme.AppCompat (aka com.kevinladelfa.duevent:style/Base.V23.Theme.AppCompat) not found.
Error:resource style/Base.V23.Theme.AppCompat.Light (aka com.kevinladelfa.duevent:style/Base.V23.Theme.AppCompat.Light) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v26\values-v26.xml
Error:(7) style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
Error:(11) style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
Error:resource style/Base.V7.Widget.AppCompat.Toolbar (aka com.kevinladelfa.duevent:style/Base.V7.Widget.AppCompat.Toolbar) not found.
Error:resource style/Base.Widget.AppCompat.DrawerArrowToggle.Common (aka com.kevinladelfa.duevent:style/Base.Widget.AppCompat.DrawerArrowToggle.Common) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-hdpi-v4\values-hdpi-v4.xml
Error:(4) error: style attribute 'attr/barLength (aka com.kevinladelfa.duevent:attr/barLength)' not found.
Error:(5) error: style attribute 'attr/gapBetweenBars (aka com.kevinladelfa.duevent:attr/gapBetweenBars)' not found.
Error:(6) error: style attribute 'attr/drawableSize (aka com.kevinladelfa.duevent:attr/drawableSize)' not found.
Error:(4) style attribute 'attr/barLength (aka com.kevinladelfa.duevent:attr/barLength)' not found.
Error:(5) style attribute 'attr/gapBetweenBars (aka com.kevinladelfa.duevent:attr/gapBetweenBars)' not found.
Error:(6) style attribute 'attr/drawableSize (aka com.kevinladelfa.duevent:attr/drawableSize)' not found.
Error:resource style/Base.DialogWindowTitle.AppCompat (aka com.kevinladelfa.duevent:style/Base.DialogWindowTitle.AppCompat) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v17\values-v17.xml
Error:(24) resource dimen/abc_dropdownitem_text_padding_left (aka com.kevinladelfa.duevent:dimen/abc_dropdownitem_text_padding_left) not found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt

My Gradle:

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.1.1'
}
}

allprojects {
repositories {
    google()
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.kevinladelfa.duevent"
    minSdkVersion 22
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.1'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.google.firebase:firebase-storage:11.4.2'
compile 'com.google.firebase:firebase-firestore:11.4.2'
}

Upvotes: 0

Views: 1063

Answers (1)

azamatikus
azamatikus

Reputation: 73

All that errors “color error or font error” came from higher version of firebase ui in graddle/app. Try to use lower version of it.

Or try to use this:

          maven {
               url 'https://maven.google.com'
                      }

enter image description here

And you can always check: https://firebase.google.com/support/release-notes/android

And try to add this:

  android {
             compileSdkVersion 26
             buildToolsVersion "26.1.0"
    defaultConfig {
      applicationId "..."
            minSdkVersion 22
            targetSdkVersion 26

Or decrease sdk and AppCompat version to check if the lower version works fine.

         compileSdkVersion 25
             buildToolsVersion "25.3.1"
         defaultConfig {
      applicationId "..."
            minSdkVersion 22
            targetSdkVersion 25

....

   'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'

And so on.

In addition don't forget to reboot your Mac at least once in a week) emulator works better

Upvotes: 1

Related Questions