Failed compiling Android resourses

Did you also try with Defold and your project located somewhere in your home folder?

That part of the bundle process will run aapt (android asset packing tool) on Android resources. Perhaps access to the tool (included in the Defold editor) or project files is prevented somehow by Windows or some security software.

Also, check that you have set all application icons in the Android section of game. project.

Like that right?
5
6
Also i run Defold as administrator and still get an error
What about icons?
Thats enough?
4

Yes, that should be enough.

изображение
Also i setup all icons in “push” fields
I dont using any security software and i set “allow” in firewall
Isn’t strange?)

What have you set as package name in the Android section of game. project?

Hmm, ok. We need to add additional logging to understand what is going on. I can prepare a custom version of bob.jar with extra logging later this week (I’m traveling today and tomorrow) and share that with you.

Oh thanks!

There’s a bob.jar with some additional loggin available for download here:

https://d.defold.com/alpha/

I would appreciate if you could give it a try with the same command line as before and share the output here! Thanks.

1 Like

I uploaded bob from link and swapped with the previous
the same?

mptyProject/bob.jar!/lib/android-res.zip' to 'C:\Users\Home\AppData\Local\Temp\1
1070405446670656011\META-INF\MANIFEST.MF'
авг. 27, 2022 3:35:49 PM com.dynamo.bob.bundle.AndroidBundler log
INFO: Compiling resources from C:\Users\Home\EmptyProject\build\default\EmptyPro
ject\res
авг. 27, 2022 3:35:49 PM com.dynamo.bob.bundle.AndroidBundler log
INFO: Compiling C:\Users\Home\EmptyProject\build\default\EmptyProject\res\com.de
fold.android to C:\Users\Home\AppData\Local\Temp\compiled_resources8823678185608
321696\com.defold.android
авг. 27, 2022 3:35:49 PM com.dynamo.bob.bundle.AndroidBundler log
INFO: exec: C:\Users\Home\AppData\Local\Temp\11070405446670656011\x86_64-win32\a
apt2.exe compile -o C:\Users\Home\AppData\Local\Temp\compiled_resources882367818
5608321696\com.defold.android --dir C:\Users\Home\EmptyProject\build\default\Emp
tyProject\res\com.defold.android
авг. 27, 2022 3:35:49 PM com.dynamo.bob.bundle.AndroidBundler log
INFO: Failed compiling C:\Users\Home\AppData\Local\Temp\compiled_resources882367
8185608321696\com.defold.android, code: -1073741701, error:
ERROR: unspecified:-1: 'com.dynamo.bob.CompileExceptionError: Failed compiling A
ndroid resources'

Failed compiling Android resources
Cause: java.io.IOException:
com.dynamo.bob.CompileExceptionError: Failed compiling Android resources
        at com.dynamo.bob.bundle.AndroidBundler.compileResources(AndroidBundler.
java:412)
        at com.dynamo.bob.bundle.AndroidBundler.createAAB(AndroidBundler.java:72
6)
        at com.dynamo.bob.bundle.AndroidBundler.bundleApplication(AndroidBundler
.java:845)
        at com.dynamo.bob.Project.bundle(Project.java:785)
        at com.dynamo.bob.Project.doBuild(Project.java:1268)
        at com.dynamo.bob.Project.build(Project.java:632)
        at com.dynamo.bob.Bob.mainInternal(Bob.java:766)
        at com.dynamo.bob.Bob.main(Bob.java:832)
Caused by: java.io.IOException:
        at com.dynamo.bob.bundle.AndroidBundler.compileResources(AndroidBundler.
java:405)
        ... 7 more
Warning: Failed to clean up temp directory 'C:\Users\Home\AppData\Local\Temp\110
70405446670656011'

C:\Users\Home\EmptyProject>```

I can’t say for sure what is failing.
One thing to note is that we only support Java 11, due to the fact that that’s what Android supports.

Also, please post text, as opposed to screenshots.
It’s very hard to read, and it isn’t searchable.
POst the t ext between triple ` and you’ll get it formatted:

some text

Edited last post
изображение
Install jdk11, still getting that error [Failed compiling Android resourses - #11 by sonytruelove]

And what happens if you run this in your command prompt?

Thanks. This shows some additional info:

  • It fails when compiling C:\Users\Home\EmptyProject\build\default\EmptyProject\res\com.defold.android to C:\Users\Home\AppData\Local\Temp\compiled_resources8823678185608 321696\com.defold.android
  • It fails with code -1073741701. Weird code to be honest. I need to look into this.

What strikes me as strange is C:\Users\Home. Is your user really named “Home”?

Can you share your project as a zip file here?

My user is “Home” - that’s for sure
Without bob
EmptyProject.zip (349.8 KB)

изображение
I havent there aapt2.exe
"aapt2.exe" not recognized as an internal or external command,operable program or batch file

Yeah, it was a bit of a long shot as it’s a temporary folder that we try to delete after the process is done with it.

I’m out of ideas. There is something on your computer preventing java from running aapt2.exe from that temporary folder.

Ok,it’s not a problem,i will bundle on notebook!
Now I am sure that the problem is not in my actions and this the main thing
If i find out what’s wrong,I’ll be sure to let you know!
Thank you guys so much for your work and fast feedback! :grin:

1 Like