Compile error while trying to compile android app

2020-03-24 11:00发布

I am trying to compile my android app in ant and I keep getting this message:

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

why does this happen? I am using the template from android sdk 4.

Thanks, Jason

标签: android ant
2条回答
贪生不怕死
2楼-- · 2020-03-24 11:30

Just had the same issue and resolved the problem by using the right ant build.xml, probably the one Google really maintains. It's located at android-sdk\tools\ant\main_rules.xml and resolves this issue.

查看更多
混吃等死
3楼-- · 2020-03-24 11:36

Please, provide full ant output with stack trace. You're probably using mismatched sdk/target platform versions. This might cause use of unsupported build system features from your build.xml. Upgrade your sdk, and update build configuration with 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

查看更多
登录 后发表回答