Android Studio - AAPT: error: file failed to compile with PNG images - java
I was working on Ubuntu linux and recently i pulled my project and started working on Win10.
From now on i cannot Build/Run my app. There must be a problem with those PNG files in the resources folder.
That is the Error output while trying to build the app :
Executing tasks: [:app:assembleDebug] in project C:\Users\Psz\Documents\Android-ChatRoom-Client
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:mergeDebugResources FAILED
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-ldpi\\ic_launcher_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-ldpi\\ic_launcher_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-xhdpi\\ic_greensky_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-xhdpi\\ic_greensky_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-hdpi\\ic_launcher_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-hdpi\\ic_launcher_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-mdpi\\ic_greensky_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-mdpi\\ic_greensky_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-mdpi\\ic_launcher_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-mdpi\\ic_launcher_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-xxhdpi\\ic_greensky_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-xxhdpi\\ic_greensky_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-hdpi\\ic_greensky_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-hdpi\\ic_greensky_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource compilation failed","sources":[{"file":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-ldpi\\ic_greensky_background.png"}],"original":"C:\\Users\\Psz\\Documents\\Android-ChatRoom-Client\\app\\build\\generated\\res\\pngs\\debug\\drawable-ldpi\\ic_greensky_background.png: AAPT: error: file failed to compile.\n ","tool":"AAPT"}
> Task :app:mergeDebugJavaResource
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-ldpi\ic_greensky_background.png: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-mdpi\ic_greensky_background.png: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-ldpi\ic_launcher_background.png: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-hdpi\ic_greensky_background.png: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-mdpi\ic_launcher_background.png: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-xhdpi\ic_greensky_background.png: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-hdpi\ic_launcher_background.png: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Psz\Documents\Android-ChatRoom-Client\app\build\generated\res\pngs\debug\drawable-xxhdpi\ic_greensky_background.png: AAPT: error: file failed to compile.
* 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
10 actionable tasks: 2 executed, 8 up-to-date
build.gradle(:app) file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
configurations.all {
resolutionStrategy.eachDependency{
DependencyResolveDetails details ->
def requested = details.requested
if (requested.group=="com.android.support"){
if (!requested.name.startsWith("multidex")){
details.useVersion("26.+")
}
}
}
}
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.myname.greenskychatroom"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation files('libs/json-simple-1.1.jar')
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
I don't know what is causing it. I cleaned cache, delete and pull project again. Also i couldn't find a solution online.
Update
Found out that Android Studio on Linux(Ubuntu) works just fine and as a matter of fact this error occurs only on Windows' Android Studio..
If some files have been encrypted, AAPT may not work properly. Please check whether the files related to the compilation error are encrypted. In your case, these are PNG files.
I had exactly the same error. Tried everything including pulling my own hear out, but nothing worked. Then someone mentioned running Android Studio as admin would solve the problem... So it has something to do with write access problems. Bingo! Try this:
In windows go to Ransomware protection and disable it!
Then try building again. If that works then use Allow an app through Controlled folder access to give gradle the right access rights. And then enable your Ransomware protection again.
I encountered a similar problem to this, and the root cause was that a JPEG file was named with a PNG file extension. Once I fixed the file extension AAPT was happy.
In Windows, try to keep your project in a drive apart from windows (C drive). You can use D drive and try keeping the path short (eg. D:\Projects\XyzProject). This might resolve your issue.
i face same problem ,and solved .this error is due to windows security , select the file properties which causing issue and unblock it.
im my case i tried to use some png images that i downloaded from whatsapp and they were encrypted.
to fix it follow this steps:
1-open paint
2-open your images
3-save them
and you are ready to go!
Related
Android studio:Configure Project in android studio
Executing tasks: [:app:assembleDebug] in project C:\Users\Zebranic\AndroidStudioProjects\Atoz Configure project :app registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) Task :app:preBuild UP-TO-DATE Task :app:preDebugBuild UP-TO-DATE Task :app:checkDebugManifest Task :app:compileDebugAidl NO-SOURCE Task :app:compileDebugRenderscript NO-SOURCE Task :app:generateDebugBuildConfig Task :app:mainApkListPersistenceDebug Task :app:generateDebugResValues Task :app:generateDebugResources Task :app:writeDebugApplicationId Task :app:processDebugGoogleServices Parsing json file: C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\google-services.json Task :app:javaPreCompileDebug Task :app:createDebugCompatibleScreenManifests Task :app:processDebugManifest C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\AndroidManifest.xml:24:9-31:50 Warning: activity#com.google.firebase.auth.internal.FederatedSignInActivity#android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present Task :app:mergeDebugShaders Task :app:compileDebugShaders Task :app:generateDebugAssets Task :app:mergeDebugAssets Task :app:mergeDebugResources Task :app:processDebugResources FAILED AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\res\drawable\btntrail.xml"}],"original":"C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\res\drawable\btntrail.xml: AAPT: error: elements require a sdk version of at least 26.\n ","tool":"AAPT"} FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:processDebugResources'. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\res\drawable\btntrail.xml: AAPT: error: elements require a sdk version of at least 26. 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 12s 14 actionable tasks: 14 executed
AAPT: error: elements require a sdk version of at least 26.\n ","tool":"AAPT" Try Updating SDK version. Settings->System Settings->Android SDK->SDK Tools Check Android SDK Tools 26.1.1 At least v26 is to be installed or higher.
How do I fix my React Native failing Android build in Gradle? com.google.firebase:firebase-iid is being requested by various other libraries
I have tried generating a signed APK according to the instructions here: https://facebook.github.io/react-native/docs/signed-apk-android When running ./gradlew assembleRelease, I get a build error as seen below. My app uses Google Firebase for authentication and tipsi-stripe as one of its main libraries. It is a detached Expo build. I have tried adding additional dependencies, including Firebase core in app/build.gradle The error in the terminal. ❯ ./gradlew assembleRelease Parallel execution is an incubating feature. {..} > Task :tipsi-stripe:compileReleaseRenderscript FAILED > Task :app:checkDevKernelReleaseClasspath FAILED > Task :react-native-firebase:compileReleaseRenderscript FAILED FAILURE: Build completed with 3 failures. 1: Task failed with an exception. ----------- * What went wrong: Failed to capture fingerprint of input files for task ':tipsi-stripe:compileReleaseRenderscript' property 'importDirs' during up-to-date check. > The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Failed to capture fingerprint of input files for task ':app:checkDevKernelReleaseClasspath' property 'compileClasspath' during up-to-date check. > The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies. ============================================================================== 3: Task failed with an exception. ----------- * What went wrong: Failed to capture fingerprint of input files for task ':react-native-firebase:compileReleaseRenderscript' property 'importDirs' during up-to-date check. > The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies. ============================================================================== BUILD FAILED in 18s 38 actionable tasks: 3 executed, 35 up-to-date My app/build.gradle: https://gist.github.com/christopheragnus/35c13d31976c889268b663cbf1654ead My root /build.gradle: https://gist.github.com/christopheragnus/e6f506d6882ad37ce7656140a240f5bf EDIT: I tried changing /build.gradle to use version 16.2.0, resolutionStrategy { ... force 'com.google.firebase:firebase-iid:16.2.0' } This resulted in a different but same type of error: > Task :tipsi-stripe:compileReleaseRenderscript FAILED > Task :app:checkDevKernelReleaseClasspath FAILED > Task :react-native-firebase:compileReleaseRenderscript FAILED Could not resolve all files for configuration ':tipsi-stripe:releaseCompileClasspath'. > Could not find com.google.android.gms:play-services-measurement-api:11.8.0. ... > Could not find com.google.android.gms:play-services-measurement-base:11.8.0. ... > Could not find com.google.android.gms:play-services-ads-identifier:11.8.0.
AAPT2 error: check logs for details AGPBI
Executing tasks: [clean, :app:assembleDebug] :clean UP-TO-DATE :app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild :app:compileDebugAidl :app:compileDebugRenderscript :app:checkDebugManifest :app:generateDebugBuildConfig :app:prepareLintJar UP-TO-DATE :app:mainApkListPersistenceDebug :app:generateDebugResValues :app:generateDebugResources :app:mergeDebugResources :app:createDebugCompatibleScreenManifests :app:processDebugManifest C:\Users\Marco\AndroidStudioProjects\ClassFinding\app\src\main\AndroidManifest.xml:39:9-41:45 Warning: Element meta-data#android.support.PARENT_ACTIVITY at AndroidManifest.xml:39:9-41:45 duplicated with element declared at AndroidManifest.xml:31:9-33:45 :app:splitsDiscoveryTaskDebug AGPBI: {"kind":"error","text":"error: resource drawable/ic_launcher_background (aka com.example.venturicompany.classfinding:drawable/ic_launcher_background) not found.","sources":[{"file":"C:\\Users\\Marco\\AndroidStudioProjects\\ClassFinding\\app\\src\\main\\res\\mipmap-anydpi-v26\\ic_launcher.xml","position":{"startLine":2}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: resource drawable/ic_launcher_background (aka com.example.venturicompany.classfinding:drawable/ic_launcher_background) not found.","sources":[{"file":"C:\\Users\\Marco\\AndroidStudioProjects\\ClassFinding\\app\\src\\main\\res\\mipmap-anydpi-v26\\ic_launcher_round.xml","position":{"startLine":2}}],"original":"","tool":"AAPT"} :app:processDebugResources error: failed linking file resources. :app:processDebugResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. > Failed to process resources, see aapt output above for details. * 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 10s 15 actionable tasks: 13 executed, 2 up-to-date I tried already with "android.enableAapt2=false", but Android Studio doesn't allow me to disable it. How can I navigate past this problem? I'm using the most up to date version of Android studio.
the Mainfest.xml is wrongful: Element meta-data#android.support.PARENT_ACTIVITY at AndroidManifest.xml:39 duplicated with element declared at AndroidManifest.xml:31
{"kind":"error","text":"error: resource drawable/ic_launcher_background (aka com.example.venturicompany.classfinding:drawable/ic_launcher_background) not found It's looking for ic_launcher_background which couldn't be found. However, place the ic launcher icon in /mipmap directory. Then, use Android Studio's image Assets to create the background-foreground icon. It will create the background for ic launcher too. However, it seems like it is defined twice too: AndroidManifest.xml:39:9-41:45 duplicated with element declared at AndroidManifest.xml:31:9-33:45 Which needs to be checked.
This line shows clearly C:\Users\Marco\AndroidStudioProjects\ClassFinding\app\src\main\AndroidManifest.xml:39:9-41:45 Warning: Element meta-data#android.support.PARENT_ACTIVITY at AndroidManifest.xml:39:9-41:45 duplicated with element declared at AndroidManifest.xml:31:9-33:45 :app:splitsDiscoveryTaskDebug AGPBI: {"kind":"error","text":"error: resource drawable/ic_launcher_background (aka com.example.venturicompany.classfinding:drawable/ic_launcher_background) not found.","sources":[{"file":"C:\\Users\\Marco\\AndroidStudioProjects\\ClassFinding\\app\\src\\main\\res\\mipmap-anydpi-v26\\ic_launcher.xml","position":{"startLine":2}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: resource drawable/ic_launcher_background (aka com.example.venturicompany.classfinding:drawable/ic_launcher_background) not found.","sources":[{"file":"C:\\Users\\Marco\\AndroidStudioProjects\\ClassFinding\\app\\src\\main\\res\\mipmap-anydpi-v26\\ic_launcher_round.xml","position":{"startLine":2}}],"original":"","tool":"AAPT"} Since you had not posted your manifest show i need to assume that at line number 39 duplicate element is been declared or their is something wrong with your ic launcher image if want to set app icon then you can do by following 1)click on new 2)click on image asset 3)choose your image 4)click finish 5)New image will be available for app icon 6)if you had set new name then change the manifest with your new name I think you had choose new image and does not change your manifest for new image(maybe this was the problem)
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
I'm trying to build my release apk and Android Stdio gives me error. Error:Execution failed for task ':app:transformClassesWithDexForRelease'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --num-threads=4 --multi-dex --main-dex-list C:\Users\azats\Desktop\App\app\build\intermediates\multi-dex\release\maindexlist.txt --output C:\Users\azats\Desktop\App\app\build\intermediates\transforms\dex\release\folders\1000\1f\main C:\Users\azats\Desktop\App\app\build\intermediates\transforms\jarMerging\release\jars\1\1f\combined.jar} I cleaned and built the project multiple times, but it didn't work. What's the problem?
Try adding: defaultConfig {multiDexEnabled true.....} and to avoid dex error in certain kitkat devices compile 'com.android.support:multidex:1.0.2' to your app/build.gradle you might want to take a look at: Configure Apps with Over 64K Methods
Gradle build keeps failing. File not found error comes in cache
A couple of weeks ago I was programming an app. It was working and running successfully then. Today I tried opening Android Studio and I keep on getting the following error in the gradle build: Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources] Configuration on demand is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:prepareDebugDependencies :app:compileDebugAidl FAILURE: Build failed with an exception. * What went wrong: java.io.FileNotFoundException: C:\Users\Yasmeen\Desktop\Tarikh Uni\OrganiserApp\Organiser\.gradle\2.8\taskArtifacts\cache.properties (The system cannot find the file specified) > C:\Users\Yasmeen\Desktop\Tarikh Uni\OrganiserApp\Organiser\.gradle\2.8\taskArtifacts\cache.properties (The system cannot find the file specified) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 4.88 secs I don't know what to do. I've googled it and have attempted some of the answers like deleting the scripts folder in the .gradle folder then restart Android studio but that doesn't help. EDIT = I tried copying the 'cache.properties' file from the ...2.8/cache folder into my project. It does go further into the gradle build but now these errors comes up. Shows up in the gradle console build: Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources] Configuration on demand is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:prepareDebugDependencies :app:compileDebugAidl :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources :app:processDebugManifest :app:processDebugResources AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027windowActionBar\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":10,"startColumn":4,"startOffset":384,"endLine":13,"endColumn":12,"endOffset":532}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027windowNoTitle\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":10,"startColumn":4,"startOffset":384,"endLine":13,"endColumn":12,"endOffset":532}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027windowActionBar\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\src\\main\\res\\values-v21\\styles.xml","position":{"startLine":2,"startColumn":4,"startOffset":20,"endLine":7,"endColumn":12,"endOffset":321}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027windowNoTitle\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\src\\main\\res\\values-v21\\styles.xml","position":{"startLine":2,"startColumn":4,"startOffset":20,"endLine":7,"endColumn":12,"endOffset":321}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat.Light.DarkActionBar\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\build\\intermediates\\res\\merged\\debug\\values\\values.xml","position":{"startLine":19}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027colorAccent\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":3,"startColumn":4,"startOffset":57,"endLine":8,"endColumn":12,"endOffset":376}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027colorPrimary\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":3,"startColumn":4,"startOffset":57,"endLine":8,"endColumn":12,"endOffset":376}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027colorPrimaryDark\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":3,"startColumn":4,"startOffset":57,"endLine":8,"endColumn":12,"endOffset":376}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027ThemeOverlay.AppCompat.Dark.ActionBar\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\build\\intermediates\\res\\merged\\debug\\values\\values.xml","position":{"startLine":25}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027ThemeOverlay.AppCompat.Light\u0027.","sources":[{"file":"C:\\Users\\Yasmeen\\Desktop\\Tarikh Uni\\OrganiserApp\\Organiser\\app\\build\\intermediates\\res\\merged\\debug\\values\\values.xml","position":{"startLine":30}}],"original":"","tool":"AAPT"} FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Yasmeen\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 8.22 secs From the gradles messages build: Error:(3, 5) No resource found that matches the given name: attr 'windowActionBar'. C:\Users\Yasmeen\Desktop\Tarikh Uni\OrganiserApp\Organiser\app\src\main\res\values-v21\styles.xml C:\Users\Yasmeen\Desktop\Tarikh Uni\OrganiserApp\Organiser\app\src\main\res\values\styles.xml Error:(3, 5) No resource found that matches the given name: attr 'windowNoTitle'. Error:(11, 5) No resource found that matches the given name: attr 'windowNoTitle'. Error:(11, 5) No resource found that matches the given name: attr 'windowActionBar'. Error:(4, 5) No resource found that matches the given name: attr 'colorAccent'. Error:(4, 5) No resource found that matches the given name: attr 'colorPrimary'. Error:(20) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. Error:(4, 5) No resource found that matches the given name: attr 'colorPrimaryDark'. C:\Users\Yasmeen\Desktop\Tarikh Uni\OrganiserApp\Organiser\app\build\intermediates\res\merged\debug\values\values.xml Error:(26) Error retrieving parent for item: No resource found that matches the given name 'ThemeOverlay.AppCompat.Dark.ActionBar'. Error:(31) Error retrieving parent for item: No resource found that matches the given name 'ThemeOverlay.AppCompat.Light'. Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Yasmeen\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1
Try without space in he path. \Tarikh Uni\
I have counted the same problem, because my application module dependence another library, they all dependence a common library. The build.gradle of common library include dataBinding { enabled = true } but my application module did not include dataBinding { enabled = true } in the android closure . then I add dataBinding { enabled = true } in my application module android closure. then my project can run normally. Hope this can help you.