我最近在尝试为 Android 构建 apk 时遇到了我的 Azure CI 管道问题。
我收到以下错误:
Build-tool 31.0.0 is missing DX at /usr/local/lib/android/sdk/build-tools/31.0.0/dx
FAILURE: Build failed with an exception.
- What went wrong: Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
解决方法 :当我在 package.json 文件中将“cordova-android”版本从“9.0.0”更改为“8.1.0”时,我找到了一种解决方法,或者您可以使用“ionic cordova add andorid@8.1.0”代替“ ionic Cordova 添加安道尔”。
希望能帮助到你。
最佳答案
这是因为 dx
Android SDK Build Tools 31.0.0 中缺少文件并替换为 d8
文件。尝试通过以下方式修改 Android SDK Build Tools 31.0.0:
C:\Users\Me\AppData\Local\Android\Sdk\build-tools\31.0.0
)中,创建 d8.bat
的副本并将其重命名为 dx.bat
. d8.jar
的副本并将其重命名为 dx.jar
. 关于android - Azure DevOps ionic Android 构建错误 "Build-tool 31.0.0 is missing DX at/usr/local/lib/android/sdk/build-tools/31.0.0/dx",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68572466/