我试过编译 libreoffice core项目(选择 Android 模块)(使用 make
,尚未涉及 Gradle),我收到此错误:
/home/aleksandar/libreoffice/workdir/UnpackedTarball/owncloud_android_lib/build.xml:90:
Cannot find /home/aleksandar/Android/Sdk/tools/ant/build.xml imported from /home/aleksandar/libreoffice/workdir/UnpackedTarball/owncloud_android_lib/build.xml
查看我的 SDK 时,我意识到 /Sdk/tools/ant
文件夹甚至不存在。这是应该的方式吗?
我不确定为什么它现在会导致该错误,尤其是我已经多次构建该项目而没有任何问题。我知道的唯一改变是我已经更新了所有工具(SDK 和 NDK)。在发布这篇文章时(2017 年 3 月),是否有任何向后兼容的破坏性变化?可能是源代码的变化引入了这个bug,但我相信它已经被注意到了,而且这种情况已经持续了几天......有人遇到过类似的问题吗?
最佳答案
是的
Android 团队决定在 25.3.0 SDK 工具的 3 月版本中从 SDK 中删除所有旧的和过时的脚本
https://developer.android.com/studio/releases/sdk-tools.html SDK 工具,修订版 25.3.0(2017 年 3 月)
Changes:
- Obsolete/deprecated tools have been removed:
- android
- ddms (instead see Using DDMS)
- draw9patch (instead see Draw 9-patch)
- hierarchyviewer (instead see Profile Your Layout with Hierarchy Viewer)
- traceview (instead see Profiling with Traceview and dmtracedump)
- ant scripts
- Project and activity templates
在这里你可以下载旧版本:
https://dl.google.com/android/repository/tools_r25.2.5-windows.zip
https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip
https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
关于android - Android SDK 中突然缺少 ant/文件夹。谷歌删除了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42912824/