0

I just created a new project in Android Studio and after the gradle build it is showing the following error. I have no idea why this is going on.

Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
C:\Users\DEVPC\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\4a763fb9bbd72a5413be967c96404ad9\res\values-v11\values-v11.xml
Error:(67, 5) error: resource style/Widget.AppCompat.Button.Borderless (aka com.asif047.includinglibrary2:style/Widget.AppCompat.Button.Borderless) not found.
Error:(67, 5) error: resource style/Widget.AppCompat.ButtonBar.AlertDialog (aka com.asif047.includinglibrary2:style/Widget.AppCompat.ButtonBar.AlertDialog) not found.
Error:(72, 5) error: resource style/Widget.AppCompat.ButtonBar.AlertDialog (aka com.asif047.includinglibrary2:style/Widget.AppCompat.ButtonBar.AlertDialog) not found.
Error:(72, 5) error: resource style/Widget.AppCompat.Button.Borderless (aka com.asif047.includinglibrary2:style/Widget.AppCompat.Button.Borderless) not found.
Error:(77, 5) error: resource style/Widget.AppCompat.ButtonBar.AlertDialog (aka com.asif047.includinglibrary2:style/Widget.AppCompat.ButtonBar.AlertDialog) not found.
Error:(77, 5) error: resource style/Widget.AppCompat.Button.Borderless (aka com.asif047.includinglibrary2:style/Widget.AppCompat.Button.Borderless) not found.
C:\Users\DEVPC\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\4a763fb9bbd72a5413be967c96404ad9\res\values-v21\values-v21.xml
Error:(49, 5) error: resource string/abc_font_family_title_material (aka com.asif047.includinglibrary2:string/abc_font_family_title_material) not found.
Error:(49, 5) error: resource dimen/abc_text_size_menu_header_material (aka com.asif047.includinglibrary2:dimen/abc_text_size_menu_header_material) not found.
Error:(111, 5) error: resource dimen/abc_floating_window_z (aka com.asif047.includinglibrary2:dimen/abc_floating_window_z) not found.
Error:resource style/Theme.AppCompat.Light.DarkActionBar (aka com.asif047.includinglibrary2:style/Theme.AppCompat.Light.DarkActionBar) not found.
E:\E-COMMERCE NEW\IncludingLibrary2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v14\values-v14.xml
Error:(4) error: resource dimen/abc_text_size_button_material (aka com.asif047.includinglibrary2:dimen/abc_text_size_button_material) not found.
Error:(4) resource dimen/abc_text_size_button_material (aka com.asif047.includinglibrary2:dimen/abc_text_size_button_material) not found.
Error:resource style/Base.Theme.AppCompat.Dialog.FixedSize (aka com.asif047.includinglibrary2:style/Base.Theme.AppCompat.Dialog.FixedSize) not found.
Error:resource style/TextAppearance.AppCompat (aka com.asif047.includinglibrary2:style/TextAppearance.AppCompat) not found.
Error:resource style/Base.Theme.AppCompat.Light.Dialog.FixedSize (aka com.asif047.includinglibrary2:style/Base.Theme.AppCompat.Light.Dialog.FixedSize) not found.
Error:resource style/Base.V7.Theme.AppCompat.Light.Dialog (aka com.asif047.includinglibrary2:style/Base.V7.Theme.AppCompat.Light.Dialog) not found.
Error:resource style/Base.V7.Theme.AppCompat.Dialog (aka com.asif047.includinglibrary2:style/Base.V7.Theme.AppCompat.Dialog) not found.
Error:resource style/Base.V7.ThemeOverlay.AppCompat.Dialog (aka com.asif047.includinglibrary2:style/Base.V7.ThemeOverlay.AppCompat.Dialog) not found.
E:\E-COMMERCE NEW\IncludingLibrary2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v11\values-v11.xml
Error:(63) resource style/Widget.AppCompat.ButtonBar.AlertDialog (aka com.asif047.includinglibrary2:style/Widget.AppCompat.ButtonBar.AlertDialog) not found.
Error:(64) resource style/Widget.AppCompat.Button.Borderless (aka com.asif047.includinglibrary2:style/Widget.AppCompat.Button.Borderless) not found.
Error:(68) resource style/Widget.AppCompat.ButtonBar.AlertDialog (aka com.asif047.includinglibrary2:style/Widget.AppCompat.ButtonBar.AlertDialog) not found.
Error:(69) resource style/Widget.AppCompat.Button.Borderless (aka com.asif047.includinglibrary2:style/Widget.AppCompat.Button.Borderless) not found.
Error:(73) resource style/Widget.AppCompat.ButtonBar.AlertDialog (aka com.asif047.includinglibrary2:style/Widget.AppCompat.ButtonBar.AlertDialog) not found.
Error:(74) resource style/Widget.AppCompat.Button.Borderless (aka com.asif047.includinglibrary2:style/Widget.AppCompat.Button.Borderless) not found.
Error:resource style/Base.V7.Widget.AppCompat.AutoCompleteTextView (aka com.asif047.includinglibrary2:style/Base.V7.Widget.AppCompat.AutoCompleteTextView) not found.
Error:resource style/Base.V7.Widget.AppCompat.EditText (aka com.asif047.includinglibrary2:style/Base.V7.Widget.AppCompat.EditText) not found.
Error:resource style/Base.V7.Theme.AppCompat (aka com.asif047.includinglibrary2:style/Base.V7.Theme.AppCompat) not found.
E:\E-COMMERCE NEW\IncludingLibrary2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v21\values-v21.xml
Error:(50) resource dimen/abc_text_size_menu_header_material (aka com.asif047.includinglibrary2:dimen/abc_text_size_menu_header_material) not found.
Error:(49) resource string/abc_font_family_title_material (aka com.asif047.includinglibrary2:string/abc_font_family_title_material) not found.
Error:(113) resource dimen/abc_floating_window_z (aka com.asif047.includinglibrary2:dimen/abc_floating_window_z) 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

And here the gradle file info is given:

> apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.asif047.includinglibrary2"
        minSdkVersion 15
        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.1.2'
    testImplementation 'junit:junit:4.12'

}
u32i64
  • 2,384
  • 3
  • 22
  • 36
Asif047
  • 21
  • 1
  • 1
  • 9

2 Answers2

0

There could be several possible reasons for this error. Since I am not sure about your project level gradle and version of gradle your using, I suggest you to update your gradle if you use any older versions. There is a SO post which might be helpful to you.

devgun
  • 1,003
  • 13
  • 33
0

I have this issue as well as I'm using a modified android.jar (which has all the hidden API revealed). I don't use the unit testing and there's no apparent way to disable it in Android Studio 2.2.2, so I found a workaround for this problem:

1. Go to File -> Settings -> Build, Execution, Deployment -> Compiler
2. Add to "Command-line Options":
         -x :app:prepareReleaseUnitTestDependencies -x :app:mockableAndroidJar -x 
         :app:compileReleaseUnitTestSources
3. Press "OK" and try to Rebuild Project again.

Now the unit testing compilation tasks will always be skipped and no errors will be thrown.

Viral Patel
  • 1,296
  • 1
  • 11
  • 24