Compilation error when trying to compile an Android application using ant

I am trying to compile an Android application in ant and I keep getting this message:

BUILD FAILED K:\build.xml:359: aaptexec doesn't support the "basename" attribute 

Why is this happening? I am using a template from android sdk 4.

Thanks Jason

+4
source share
2 answers

Please provide full ant output with stack trace. You are probably using mismatched versions of sdk / target. This can lead to the use of unsupported build system features from your build.xml file. Update sdk configuration and build updates using android tool:

android update project --name <project_name> --target <target_ID> --path <path_to_your_project>

See http://developer.android.com/guide/developing/other-ide.html for android command details

+1
source

It’s just that you had the same problem and resolved the problem using the correct ant build.xml, possibly the one that really supports Google. It is located in android-sdk \ tools \ ant \ main_rules.xml and fixes this problem.

+4
source

Source: https://habr.com/ru/post/1332396/


All Articles