Execution failed for task ':app:processDebugRecources'

Whenever I try to run my app with the android library available in processing, I have recently started to encounter a long error log which after sifting through it told me:

  • What went wrong:
    Execution failed for task ‘:app:processDebugResources’.

Failed to execute aapt

  • 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.

Now I have done some searching and found people with a similair issue however the solutions are varied and are never done in the processing envoirment (most of them are in android studio) So I can’t really follow the solutions they are using and while the error message does say to try with --info and the likes, I have no clue how to implement those functions.

I feel like this issue started popping up after I installed the Processing sound library but it’s hard to pinpoint since I don’t run Android tests as often as just normal Java tests on my pc.

@TheEternalDragon === in order to be sure about this error can you precise wether it happens when running the most basic android example?- Without anything in the data folder?- If yes there is probably sometning wrong with your install of the SDK. AAPT is Android Asset Packaging Tool and it is the main build tool used for creating the package with your assets and xml files; if it failed it can be the aapt module itself or some files from your app which is the culprit.

I can confirm that an empty sketch runs just fine and seeing as it was running fine until not too long ago, I suspect it is going to be the fault one of the files or imports I’m using. Would you know what types of files commonly cause this? I find it especially odd since everything runs just fine on the java side.

@TheEternalDragon === ok, so your SDK is not the culprit but the files you are packaging; without seing them it s difficult to be more precise; one common error for androitd is with naming: always use lower case, never use other than abcd…z, never use special chars like _ and be specially prudent with your fonts: here are the most common cause of errors but (not with P5 but with AS) xml can also be a cause of problems. Of course imports can also cause this kind of error, but normally this error is fired before.

I changed all the file names to be lower case and not includde any special characters, sadly it still gives me the same error. I am not using any fonts. Could you go more in depth about the xml file and how that could affect it? Or do you think the problem can be found elsewhere?

@TheEternalDragon === with P5 you have only one .xml: the manifest; so if you dont modify it (as it is generated) it’s probably not the cause of the error; Can you put some code which fires this error (and a link towards your data).

That might be a bit hard, since I don’t know what part of the program makes the error happen (as I said, I don’t often test on Android) But I can give you the entire program, it is quite long though and I don’t want to bore you with all that. Is there anything that might help narrow down where the problem is?

@TheEternalDragon === without seeing the code and the contents of your data directory (or assets, if any) it s quite impossible to help you; so, put the whole code and the data folder and i 'll give a look.

So I used google drive to upload the entire project, there might be a bit of English and Dutch mixing but I hope you that doesn’t matter too much

Old link

(and thanks for taking this much time to help me)

@TheEternalDragon === i have downloaded your files; i ll give a look to that tomorrow.

Zou je een zip kunnen opladen? Al die beelden stuk voor stuk downloaden is toch wel veel werk.

I believe if you right click the folder you can download it in it’s entirety.

It should. But by doing so, a message appears with “Preparing for download” which than disappears and I can’t find the folder anywhere. Never happened before…

Old Link

this one should do the trick

@TheEternalDragon === i have asked you wether you have modified the Manifest because it is the only one .xml with P5: you have modified it and the error comes from the Manifest (app name && icon launcher)-Change it for this one:


<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="">
    <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="26"/>
    <application android:debuggable="true" android:icon="@drawable/icon" android:label="">
        <activity android:name=".MainActivity" android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

no more error with aapt… But some other errors in your code…and with your imports i guess.
NB: you can change manually the name of your app in the Manifest but you have to use the same one which your app uses; yet this is not interesting because P5 does that automatically. As for the second error it does not happen when you use AS but with P5 which refers to drawable (inside the mode folder, subfolder icons) and not to mipmap.

I don’t remember changing the file and it is still a very much wip project, big thanks for helping me out! I’ll make the changes tomorrow.

With the new manifast the app does indeed run again (I can’t believe I didn’t see this) but I am a bit confused about your second commend, it does indeed throw me another memory error but I’m a bit confused by what you mean with

@TheEternalDragon === P5 looks (for icons) inside its own icons folder (by default) which is inside the mode folder; that means the path you have put is not the good one when the app is generated though after that the mipmap folders are created: so you leave P5 do the job; one execption: if you want to create your icons you have to go to the icons folder and there change the default icons for those you have created respecting the 6 subfolders, lpi, mdpi, hdpi, xhdpi, xxhdpi…