“aapt.exe” exited with code 1 when building Mono for Android project

Step 1: get more info

If you run across this error, hopefully, you will also run across a post from Jonathan Pryor replying to someone else with the same problem. The suggestion is to turn on more verbose logging from MSBuild to see if you get something useful out of those messages.

In the Visual Studio Options dialog, go to “Projects and Solutions” then “Build and Run”. Switch the “MSBuild project build output verbosity” from “Minimal” to “Normal” and build your project again. After doing so, I got this message which was far more helpful. Apparently, resources cannot include anything but letters, numbers, periods, and underscores ([a-z0-9_.]).

MSBuild normal verbosity logging

Solution

Rename file within the required restrictions and build again.

While this error message may come up for far more situations than filename restriction issues, a filename change fixed this particular issue completely.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)