<legend id='KjFRR'><style id='KjFRR'><dir id='KjFRR'><q id='KjFRR'></q></dir></style></legend>
      <tfoot id='KjFRR'></tfoot>

      <small id='KjFRR'></small><noframes id='KjFRR'>

      • <bdo id='KjFRR'></bdo><ul id='KjFRR'></ul>

    1. <i id='KjFRR'><tr id='KjFRR'><dt id='KjFRR'><q id='KjFRR'><span id='KjFRR'><b id='KjFRR'><form id='KjFRR'><ins id='KjFRR'></ins><ul id='KjFRR'></ul><sub id='KjFRR'></sub></form><legend id='KjFRR'></legend><bdo id='KjFRR'><pre id='KjFRR'><center id='KjFRR'></center></pre></bdo></b><th id='KjFRR'></th></span></q></dt></tr></i><div id='KjFRR'><tfoot id='KjFRR'></tfoot><dl id='KjFRR'><fieldset id='KjFRR'></fieldset></dl></div>

        Android Studio 错误“安装的构建工具修订版 31.0.0

        时间:2023-08-29
          <tbody id='fjd4z'></tbody>

          <small id='fjd4z'></small><noframes id='fjd4z'>

        • <legend id='fjd4z'><style id='fjd4z'><dir id='fjd4z'><q id='fjd4z'></q></dir></style></legend>

          • <bdo id='fjd4z'></bdo><ul id='fjd4z'></ul>

              <tfoot id='fjd4z'></tfoot>

                • <i id='fjd4z'><tr id='fjd4z'><dt id='fjd4z'><q id='fjd4z'><span id='fjd4z'><b id='fjd4z'><form id='fjd4z'><ins id='fjd4z'></ins><ul id='fjd4z'></ul><sub id='fjd4z'></sub></form><legend id='fjd4z'></legend><bdo id='fjd4z'><pre id='fjd4z'><center id='fjd4z'></center></pre></bdo></b><th id='fjd4z'></th></span></q></dt></tr></i><div id='fjd4z'><tfoot id='fjd4z'></tfoot><dl id='fjd4z'><fieldset id='fjd4z'></fieldset></dl></div>
                  本文介绍了Android Studio 错误“安装的构建工具修订版 31.0.0 已损坏"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我使用的是 Android Studio 4.2.2.我创建了一个新项目,但没有在启动代码中添加任何内容,每当我单击 build 或 run 时,都会收到此错误:

                  I'm on Android Studio 4.2.2. I created a new project and haven't added anything to the starter code and whenever I click build or run, I get this error:

                  安装的构建工具版本 31.0.0 已损坏.使用 SDK 管理器删除并重新安装.

                  Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

                  我查看了其他帖子的建议,但这些解决方案都没有奏效.这是我尝试过的:

                  I've looked at other posts' suggestions, but neither of those solutions worked. Here's what I've tried:

                  1. SDK Manager → SDK Tools → 勾选Show package details",取消勾选 31.0.0,点击Apply";→ 卸载 31.0.0 → 检查 31.0.0 并重新安装
                  2. 在 SDK 管理器中,取消选择 31.0.0 并尝试安装旧版本(例如,我尝试过 30.0.3)并更新buildToolsVersion".在 build.gradle 到安装的版本
                  3. 前往Project StructureProperties 并确认为Build Tools Version"选择了 31.0.0.和编译的 SDK 版本"
                  4. 手动删除 build-tools 文件夹中的东西;即,rm -rf/path/to/android/sdk/build-tools/31.0.0(它不像其他一些帖子所描述的那样以-rc"结尾)
                  5. 重启 Android Studio
                  6. 重新安装 Android Studio
                  1. SDK Manager → SDK Tools → check "Show package details", uncheck 31.0.0, and click "Apply" → Uninstall 31.0.0 → check 31.0.0 and reinstall it
                  2. In SDK Manager, deselect 31.0.0 and try installing an older version (e.g., I've tried 30.0.3) and update "buildToolsVersion" in build.gradle to the installed version
                  3. Went to Project StructureProperties and verified that 31.0.0 is selected for "Build Tools Version" and "Compiled SDK Version"
                  4. Manually remove the stuff in the build-tools folder; i.e., rm -rf /path/to/android/sdk/build-tools/31.0.0 (it doesn't end in "-rc" like some other posts have described)
                  5. Restart Android Studio
                  6. Reinstall Android Studio

                  我是一个 Android 菜鸟,只是想建立一个 hello world 项目,真的不应该这么难.

                  I'm an Android noob just trying to set up a hello world project, and it really shouldn't be this hard.

                  推荐答案

                  首先,我在Android Studio 4.2.2中遇到过这个问题,你不需要将SDK构建工具从31降级到30或更改编译SDK版本.

                  First of all, I faced this issue in Android Studio 4.2.2 and you do not need to downgrade the SDK build tool from 31 to 30 or change compile SDK version.

                  主要问题是 SDK 构建工具 31 中缺少的两个文件是:

                  The main problem is the two files missing in SDK build tool 31 that are:

                  1. dx.bat
                  2. dx.jar

                  解决方案是这些文件在文件位置命名为 d8,因此将其名称更改为 dx 即可解决错误.

                  The solution is that these files are named d8 in the file location so changing their name to dx will solve the error.

                  步骤如下.

                  1. 前往该地点

                  1. go to the location

                   "C:UsersuserAppDataLocalAndroidSdkuild-tools31.0.0"
                  

                • 找到一个名为 d8.bat 的文件.这是一个 Windows 批处理文件.

                • find a file named d8.bat. This is a Windows batch file.

                  将 d8.bat 重命名为 dx.bat.

                  rename d8.bat to dx.bat.

                  在文件夹 lib(C:UsersuserAppDataLocalAndroidSdkuild-tools31.0.0lib")中

                  in the folder lib ("C:UsersuserAppDataLocalAndroidSdkuild-tools31.0.0lib")

                  将 d8.jar 重命名为 dx.jar

                  rename d8.jar to dx.jar

                  记住 AppData 是一个隐藏文件夹.打开隐藏项以查看 AppData 文件夹.

                  Remember AppData is a hidden folder. Turn on hidden items to see the AppData folder.

                  # change below to your Android SDK path
                  cd ~/Library/Android/sdk/build-tools/31.0.0 
                    && mv d8 dx 
                    && cd lib  
                    && mv d8.jar dx.jar
                  

                  现在运行您的项目.

                  这篇关于Android Studio 错误“安装的构建工具修订版 31.0.0 已损坏"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                • 上一篇:英特尔在 Windows 操作系统上与 AMD 等效的 HAXM 下一篇:在屏幕android上更改对话框的位置

                  相关文章

                  最新文章

                  <small id='dbi69'></small><noframes id='dbi69'>

                  • <bdo id='dbi69'></bdo><ul id='dbi69'></ul>

                  1. <i id='dbi69'><tr id='dbi69'><dt id='dbi69'><q id='dbi69'><span id='dbi69'><b id='dbi69'><form id='dbi69'><ins id='dbi69'></ins><ul id='dbi69'></ul><sub id='dbi69'></sub></form><legend id='dbi69'></legend><bdo id='dbi69'><pre id='dbi69'><center id='dbi69'></center></pre></bdo></b><th id='dbi69'></th></span></q></dt></tr></i><div id='dbi69'><tfoot id='dbi69'></tfoot><dl id='dbi69'><fieldset id='dbi69'></fieldset></dl></div>
                  2. <tfoot id='dbi69'></tfoot>
                    <legend id='dbi69'><style id='dbi69'><dir id='dbi69'><q id='dbi69'></q></dir></style></legend>