CSDN话题挑战赛第2期
参赛话题:面试宝典

报错:Gradle build failed.See the Console for details.(已解决)

  • 1.出现问题:
  • 2.报错信息:
  • 3.总结问题:
  • 4.解决方法:
    • 4.1步骤一:下一个低版本的sdk
    • 4.3步骤三:进入sdk Manager下载相关配置
    • 4.4步骤四:更改unity中的sdk

1.出现问题:

unity一直用的好好的,昨晚下了一个Android Studio结果第二天跑unity就出现这种报错

2.报错信息:

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Build-tool 32.0.0 is missing DX at D:\Unity\UntiyDownLoad\2020.3.26f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\dx.bat
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
File C:\Users\starry\.android\repositories.cfg could not be loaded.
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Build-tool 32.0.0 is missing DX at D:\Unity\UntiyDownLoad\2020.3.26f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\dx.batUnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01FAILURE: Build failed with an exception.* What went wrong:
Could not determine the dependencies of task ':launcher:compileReleaseJavaWithJavac'.
> Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 14s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
配置项目:发射器警告:选项设置'android。enableR8 = false”是弃用。它将在5.0版的Android Gradle插件中被删除。您将不再能够禁用R8
D: Unity\UntiyDownLoad\2020.3.26f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\ DX .bat缺少DX
无法确定任务“:launcher: compilerreleeasejavawithjavac”的依赖关系。>已安装的构建工具版本32.0.0已损坏。使用SDK管理器删除并重新安装。*试一试:使用——stacktrace选项运行以获得堆栈跟踪。使用——info或——debug选项运行以获得更多日志输出。浏览,获得完整的见解。

3.总结问题:

初步估计下载AS的时候,AS把自动检测sdk并且把sdk信息更改了,导致unity使用sdk时版本不兼容,重新下了一个低版本的sdk单独给unity用,问题暂时解决

但自我感觉并未抓住问题核心,但迫于急需unity故暂用此方法解燃眉之急

4.解决方法:

4.1步骤一:下一个低版本的sdk

下载地址:AndroidDevTools - Android开发工具 Android SDK下载 Android Studio下载 Gradle下载 SDK Tools下载

##4.2 步骤二:将解压缩后的文件复制到原来的SDK的同级目录下

切记不要把原来的sdk删掉,既然原来的sdk在AS下能正常使用,那就让AS使用原来的sdk,新下载的androidsdk提供给unity使用

4.3步骤三:进入sdk Manager下载相关配置

下载之后是一个压缩包,将其解压到一个全英的路径下,双击SDK Manager可运行文件,打开下载各项依赖,具体要下写什么可详看此文章,照着搞就可:SDK Manager的使用 - 没有阳光天空也是素颜 - 博客园 (cnblogs.com)

按之前提到的那篇博客下载好后,androidsdk文件夹一共有23.8G,肯定有很多内容是不用下的,不过我也无法判断

4.4步骤四:更改unity中的sdk

报错:Gradle build failed.See the Console for details.(已解决)相关推荐

  1. Jenkins报错‘Gradle build daemon disappeared unexpectedly‘的问题解决

    Jenkins报错'Gradle build daemon disappeared unexpectedly'的问题解决 参考文章: (1)Jenkins报错'Gradle build daemon ...

  2. Vue项目启动webpack报错Module build failed: Error: No PostCSS Config found in......

    自己写的公司项目,今天需要提交到公司版本库,可是在本地启动正常的项目,拷贝到git文件目录下突然报错Module build failed: Error: No PostCSS Config foun ...

  3. npm 报错 Module build failed: Error: No PostCSS Config found in:

    npm 报错 Module build failed: Error: No PostCSS Config found in: 你在网上找的解决方案应该有提到webpack版本的问题.不要以为升级web ...

  4. Vue报错Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.解决方案

    Vue报错Module build failed: Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.解决方案 错误提示: ERRO ...

  5. npm 报错 Module build failed: Error: No PostCSS Config found in

    问题描述: 项目在本地运行不报错,上传到 GitHub 之后,再 clone 到本地,执行: npm install  或 cnpm install 安装完成之后再执行: npm run dev 这时 ...

  6. 关于报错FAILURE: Build failed with an exception.

    What went wrong: Execution failed for task ':image_cropper:generateDebugRFile'. Could not resolve al ...

  7. vue启动报错Module build failed: Error: ENOENT: no such file or directory

    vue启动项目报错,一大坨  如下 Module build failed: Error: ENOENT: no such file or directory, scandir '/Users/son ...

  8. 安装node-sass运行报错 Module build failed: TypeError: this.getResolve is not a function at Object.loader

    在搭建vue脚手架 或者是在vue项目中,想使用sass的功能, npm install node-sass --save-dev //安装node-sass npm install sass-loa ...

  9. git报错:error: failed to push some refs to ... 的解决办法及如何让线上覆盖本地方法【Git/SVN】

    报错代码 在 push 的时候,出现如下错误: error: failed to push some refs to 'ssh://git@git.umbrella.com:1024/test-pow ...

最新文章

  1. CentOS 5.5 手动安装 GCC4.6.2
  2. IELE:区块链的一个新虚拟机
  3. mysql ERROR 1045 (28000): Access denied for user解决方法
  4. Linux系统下ifconfig命令使用及结果分析
  5. 【Java】NIO中Selector的select方法源码分析
  6. FreeRTOS系列第19篇---FreeRTOS信号量
  7. mysql python连接时、指定的ip地址被转接了_pythonmysql.connector模块使用了错误的IP地址...
  8. Mybatis_day1
  9. 传统机器学习流程总结
  10. python面板数据模型_面板数据模型选择
  11. k3安装服务器系统,论如何逗比的在2008R2上安装金蝶K3服务器
  12. 【beyong-sms】一款支持多家短信服务商优美的PHP短信发送库
  13. 微信游戏奇迹暖暖选取服务器失败,奇迹暖暖微信登录授权失败
  14. 物联网卡设置_移动、联通、电信物联网卡APN设置教程
  15. JS基本语法-JavaScript中的常用函数2:判断数字类型,isNaN和isFinite的使用
  16. VoLTE用户码号和卡
  17. 什么是SCORM标准?
  18. R 实战 | 使用clusterProfiler进行多组基因富集分析
  19. AWS KVS(Kinesis Video Streams)之WebRTC集成过程(六)
  20. 反种族主义算法的偏见与警务简介

热门文章

  1. 一条短信息最长占多少byte?
  2. Freemarker 导出word
  3. 电子纸 墨水屏的驱动办法
  4. 华为nova7 pro怎么升级鸿蒙,2020年华为开发者大会:年内推出手机版鸿蒙系统
  5. java在方法中用来抛出异常关键字的是,在Java语言中以下哪个关键字用于在方法上声明抛出异常()...
  6. 淘宝运营,女装类目实操经验,女装类目日常运营优化攻略
  7. ios动态下载多种中文字体
  8. 数学分析教程(科大)——2.12笔记+习题
  9. 数据库小组作业-学生选课系统(java+java swing+mysql实现)
  10. app上传文本数据到服务器的实现