Android SDK 26以后ant编译错误解决办法(错误信息:taskdef A class needed by class com.android.ant.GetUiTargetTask)
程序员文章站
2022-04-12 22:37:16
build.xml:475: taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILoggerusing the classloader AntClassLoader[/usr/local/androidsdk/tools/lib/ant-tasks.jar:/usr/local/androidsdk/tools/lib/kxml2-2.3.0.jar:/.....
问题现象:
build.xml:475: taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILogger
using the classloader AntClassLoader[/usr/local/androidsdk/tools/lib/ant-tasks.jar:/usr/local/androidsdk/tools/lib/kxml2-2.3.0.jar:/usr/local/androidsdk/tools/lib/httpmime-4.1.jar:/usr/local/androidsdk/tools/lib/annotations-12.0.jar:/usr/local/androidsdk/tools/lib/commons-logging-1.1.1.jar]
问题原因及解决方法:
AndroidSDK26版本以后删除了ant编译相关的组件,如有需要可以手动复制添加对应文件,配置如下:
tools/ant/*
tools/lib/ant-tasks.jar
tools/lib/common.jar
tools/lib/sdklib.jar
tools/lib/guava-17.0.jar
tools/lib/manifest-merger.jar
验证重新编译即可通过
以上文件我整理一份附件贴到这里,审核通过后贴上链接,文件来源android-sdk_r24.4.1-linux
https://download.csdn.net/download/xlyrh/12683071
问题参考链接:
本文地址:https://blog.csdn.net/xlyrh/article/details/107766878
上一篇: 谷歌发布2015年度搜索排行榜