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.
Here is what I got from the error message:
Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :library:generateDebugSources, :library:generateDebugAndroidTestSources, :library:mockableAndroidJar, :library:prepareDebugUnitTestDependencies]
Error:Some file crunching failed, see logs for details
Error:Execution failed for task ':app:mergeDebugResources'.> Error: Some file crunching failed, see logs for details
Information:BUILD FAILED
Information:Total time: 3.008 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
message :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.>
Error: Some file crunching failed, see logs for details
* 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: 3.212 secs
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :library:generateDebugSources, :library:generateDebugAndroidTestSources, :library:mockableAndroidJar, :library:prepareDebugUnitTestDependencies]
Parallel execution with configuration on demand is an incubating feature.
Using the 'clean' task in combination with parallel execution may lead to unexpected runtime behavior.
Incremental java compilation is an incubating feature.
:clean
:app:clean
:library:clean
:library:preBuild UP-TO-DATE
:library:preReleaseBuild UP-TO-DATE
:library:checkReleaseManifest
:library:preDebugAndroidTestBuild UP-TO-DATE
:library:preDebugBuild UP-TO-DATE
:library:preDebugUnitTestBuild UP-TO-DATE
:library:preReleaseUnitTestBuild UP-TO-DATE
:library:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:library:prepareComAndroidSupportAppcompatV72531Library
:library:prepareComAndroidSupportSupportCompat2531Library
:library:prepareComAndroidSupportSupportCoreUi2531Library
:library:prepareComAndroidSupportSupportCoreUtils2531Library
:library:prepareComAndroidSupportSupportFragment2531Library
:library:prepareComAndroidSupportSupportMediaCompat2531Library
:library:prepareComAndroidSupportSupportV42531Library
:library:prepareComAndroidSupportSupportVectorDrawable2531Library
:library:prepareReleaseDependencies
:library:compileReleaseAidl
:library:compileLint
:library:copyReleaseLint UP-TO-DATE
:library:mergeReleaseShaders
:library:compileReleaseShaders
:library:generateReleaseAssets
:library:mergeReleaseAssets
:library:mergeReleaseProguardFiles UP-TO-DATE
:library:packageReleaseRenderscript UP-TO-DATE
:library:compileReleaseRenderscript
:library:generateReleaseResValues
:library:generateReleaseResources
:library:packageReleaseResources
:library:processReleaseManifest
:library:bundleRelease
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:app:prepareComAndroidSupportAppcompatV72531Library
:library:checkDebugManifest
:app:prepareComAndroidSupportConstraintConstraintLayout101Library
:library:prepareDebugDependencies
:library:compileDebugAidl
:app:prepareComAndroidSupportDesign2531Library
:app:prepareComAndroidSupportRecyclerviewV72531Library
:app:prepareComAndroidSupportSupportCompat2531Library
:library:compileDebugRenderscript
:app:prepareComAndroidSupportSupportCoreUi2531Library
:app:prepareComAndroidSupportSupportCoreUtils2531Library
:app:prepareComAndroidSupportSupportFragment2531Library
:app:prepareComAndroidSupportSupportMediaCompat2531Library
:library:generateDebugBuildConfig
:app:prepareComAndroidSupportSupportV42531Library
:app:prepareComAndroidSupportSupportVectorDrawable2531Library
:library:generateDebugResValues
:app:prepareComAndroidSupportTransition2531Library
:library:generateDebugResources
:library:mergeDebugResources
:app:prepareComJakewhartonButterknife881Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
AAPT: libpng error: Not a PNG file
:library:processDebugManifest
:library:processDebugResources
Error: Some file crunching failed, see logs for details
:app:mergeDebugResources FAILED
How to solve it?
Check your drawable resource/images bundled. One of them or few of them might not be the proper .png files
AAPT: libpng error: Not a PNG file
Solution open the file which is not correct in an editor and save it with same name and correct .png extension.
You should comment org.gradle.parallel = true in gradle.properties.
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.
Here is my problem
Can anyone help?
Ive tried changing the build version on gradle but it still doesnt run
[1] http://imgur.com/U5CP8rO
BUILD FAILED
Total time: 11.872 secs
Executing tasks: [:app:compileDebugSources, :app:compileDebugAndroidTestSources]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72300Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2300Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42300Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
: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
AAPT err(Facade for 1220063698): libpng error: Not a PNG file
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details
* 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: 11.771 secs
WHEN I TRY TO CLEAN BUILD:
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]
Configuration on demand is an incubating feature.
:clean
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72300Library FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:prepareComAndroidSupportAppcompatV72300Library'.
> Failed to create parent directory 'P:\BudgetWiseApp\app\build' when creating directory 'P:\BudgetWiseApp\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0'
* 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: 13.896 secs
Your log shows this:
AAPT err(Facade for 1220063698): libpng error: Not a PNG file
This means that somewhere you have an image resource that is not a PNG.
The log usually shows which file is causing the problem, but you might need to run with the --stacktrace option (e.g. gradlew assembleDebug --stacktrace).
If that still doesn't show the file name, you will need to look through your drawable folders for images that aren't PNGs.
Build -> Clean Project
Build -> Rebuild Project
make sure the images in your drawable is in png format.
you can convert any image in png format just by opening with a image editor and save as png.
I already tried looking for an answer, found some, but none of them fixed my issue. I have no idea what I'm doing, I'm just trying to change some colors and icons, nothing to serious, never compiled something for Android before. What I'm trying to compile is: https://github.com/dkim0419/SoundRecorder. If I open it in Eclipse, Android Studio or just use the terminal to compile it, shouldn't it just compile? With no issues? I have my path set (my current path to Android SDK is /home/alex/Android/Sdk and NDK is /home/alex/Android/Ndk). I just can't get rid of it. I even tried creating a blank test project and tried to compile it and got the same error. Is there something very obvious and stupid that I am missing?
This is what happens when I try to build the application:
alex#alex-Aspire-1640:~/Code/SoundRecorder-master$ ./gradlew build
:app:preBuild
:app:compileDebugNdk
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72102Library
:app:prepareComAndroidSupportCardviewV72103Library
:app:prepareComAndroidSupportRecyclerviewV72103Library
:app:prepareComAndroidSupportSupportV42103Library
:app:prepareComJpardogoMaterialtabstripLibrary106Library
:app:prepareComMelnykovFloatingactionbutton110Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
/home/alex/Code/SoundRecorder-master/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.2/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/alex/Code/SoundRecorder-master/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.2/res/drawable-hdpi/abc_spinner_mtrl_am_alpha.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/alex/Code/SoundRecorder-master/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.2/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/alex/Code/SoundRecorder-master/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.2/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/alex/Code/SoundRecorder-master/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.2/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/alex/Code/SoundRecorder-master/app/src/main/res/drawable/icon_web.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/alex/Code/SoundRecorder-master/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.2/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
:app:processDebugManifest
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/alex/Android/Sdk/build-tools/21.1.1/aapt package -f --no-crunch -I /home/alex/Android/Sdk/platforms/android-21/android.jar -M /home/alex/Code/SoundRecorder-master/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /home/alex/Code/SoundRecorder-master/app/build/intermediates/res/debug -A /home/alex/Code/SoundRecorder-master/app/build/intermediates/assets/debug -m -J /home/alex/Code/SoundRecorder-master/app/build/generated/source/r/debug -F /home/alex/Code/SoundRecorder-master/app/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package com.danielkim.soundrecorder -0 apk --output-text-symbols /home/alex/Code/SoundRecorder-master/app/build/intermediates/symbols/debug
Error Code:
132
* 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: 53.214 secs