IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 游戏开发 -> Unity3D:问题(待解决):如何:Unity2020.3.17f1c1打包APK -> 正文阅读

[游戏开发]Unity3D:问题(待解决):如何:Unity2020.3.17f1c1打包APK

目录

一.目的

1.想知道:如何:Unity2020.3.17f1c1打包APK

二.参考

三.注意

1.设置一下JDK、SDK,不要使用UnityHUB下载的Android模块

1.操作:2:发现不需要设置密钥的

四.操作:1:成功:能够新建工程然后打包APK?

1.版本

1.过程

1.解决问题:失败:新建密钥+在OtherSettings中配置好PackageName、Minimun API Level、Target API Level等参数

1.解决报错:失败:修改API等级

1.解决报错:成功:不使用UnityHUB下载自带的Android模块

1.打包成功?

四.操作:2:成功:能够正常打包APK(因为写博客时候崩溃了,导致没有了,所以重新写一下内容)

1.版本:和操作:1:一致

1.主要的步骤

1.运行结果:成功:能够打包APK



一.目的

1.想知道:如何:Unity2020.3.17f1c1打包APK

二.参考

https://blog.csdn.net/qq_33795300/article/details/112787575https://blog.csdn.net/qq_33795300/article/details/112787575

三.注意

1.设置一下JDK、SDK,不要使用UnityHUB下载的Android模块

1.操作:2:发现不需要设置密钥的

四.操作:1:成功:能够新建工程然后打包APK?

1.版本

1.过程

新建项目

切换平台

打包尝试

失败:?


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
   > Could not download gradle-4.0.1.jar (com.android.tools.build:gradle:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.jar'.
         > SSL peer shut down incorrectly
   > Could not download builder-4.0.1.jar (com.android.tools.build:builder:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.0.1/builder-4.0.1.jar'.
         > SSL peer shut down incorrectly
   > Could not download sdk-common-27.0.1.jar (com.android.tools:sdk-common:27.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/27.0.1/sdk-common-27.0.1.jar'.
         > SSL peer shut down incorrectly
   > Could not download bundletool-0.13.2.jar (com.android.tools.build:bundletool:0.13.2)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.13.2/bundletool-0.13.2.jar'.
         > SSL peer shut down incorrectly
   > Could not download protos-27.0.1.jar (com.android.tools.analytics-library:protos:27.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/27.0.1/protos-27.0.1.jar'.
         > SSL peer shut down incorrectly

* 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.org

BUILD FAILED in 47s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

CommandInvokationFailure: Gradle build failed. 
D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
   > Could not download gradle-4.0.1.jar (com.android.tools.build:gradle:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.jar'.
         > SSL peer shut down incorrectly
   > Could not download builder-4.0.1.jar (com.android.tools.build:builder:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.0.1/builder-4.0.1.jar'.
         > SSL peer shut down incorrectly
   > Could not download sdk-common-27.0.1.jar (com.android.tools:sdk-common:27.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/27.0.1/sdk-common-27.0.1.jar'.
         > SSL peer shut down incorrectly
   > Could not download bundletool-0.13.2.jar (com.android.tools.build:bundletool:0.13.2)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.13.2/bundletool-0.13.2.jar'.
         > SSL peer shut down incorrectly
   > Could not download protos-27.0.1.jar (com.android.tools.analytics-library:protos:27.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/27.0.1/protos-27.0.1.jar'.
         > SSL peer shut down incorrectly

* 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.org

BUILD FAILED in 47s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[

]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <80aef334e10c4235a9899a05c6b9e517>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

1.解决问题:失败:新建密钥+在OtherSettings中配置好PackageName、Minimun API Level、Target API Level等参数

?

?

参数说明:

  • genkey 生成文件
  • alias 别名
  • keyalg 加密算法
  • validity 有效期
  • keystore 文件名

?


> 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
WARNING: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.1.
Android SDK Build Tools 29.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.1.
Android SDK Build Tools 29.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
File C:\Users\Administrator\.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 29.0.2 in D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
Warning: License for package Android SDK Build-Tools 29.0.2 not accepted.

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:compileReleaseJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;29.0.2 Android SDK Build-Tools 29.0.2
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
  Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
  
  Using Android SDK: D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK

* 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.org

BUILD FAILED in 43s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

CommandInvokationFailure: Gradle build failed. 
D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:compileReleaseJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;29.0.2 Android SDK Build-Tools 29.0.2
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
  Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
  
  Using Android SDK: D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK

* 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.org

BUILD FAILED in 43s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[

> 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
WARNING: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.1.
Android SDK Build Tools 29.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.1.
Android SDK Build Tools 29.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
File C:\Users\Administrator\.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 29.0.2 in D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
Warning: License for package Android SDK Build-Tools 29.0.2 not accepted.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <cfa2d529f75d4ac49a883a86bf18c2b6>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <80aef334e10c4235a9899a05c6b9e517>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

1.解决报错:失败:修改API等级

?

这个报错信息好像是最少API等级为29.0.2

> Configure project :launcher
 >配置项目:launcher
WARNING: The option setting 'android. 警告:选项设置'android。 enableR8=false' is deprecated.
 enableR8 = false”是弃用。
It will be removed in version 5.0 of the Android Gradle plugin.
 它将在5.0版的Android Gradle插件中被删除。
You will no longer be able to disable R8
 您将不再能够禁用R8
WARNING: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.1.
 警告:指定的Android SDK Build Tools版本(28.0.3)被忽略,因为它低于Android Gradle Plugin 4.0.1的最低支持版本(29.0.2)。
Android SDK Build Tools 29.0.2 will be used.
 Android SDK Build Tools 29.0.2将被使用。
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build. 要抑制此警告,请从构建中删除“buildToolsVersion '28.0.3'”。 gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
 现在,每个版本的Android gradle Plugin都有一个默认版本的构建工具。
WARNING: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.1.
 警告:指定的Android SDK Build Tools版本(28.0.3)被忽略,因为它低于Android Gradle Plugin 4.0.1的最低支持版本(29.0.2)。
Android SDK Build Tools 29.0.2 will be used.
 Android SDK Build Tools 29.0.2将被使用。
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build. 要抑制此警告,请从构建中删除“buildToolsVersion '28.0.3'”。 gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
 现在,每个版本的Android gradle Plugin都有一个默认版本的构建工具。
Checking the license for package Android SDK Build-Tools 29.0.2 in D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
 检查包Android SDK Build-Tools 29.0.2在D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
Warning: License for package Android SDK Build-Tools 29.0.2 not accepted.
 Warning: License for package Android SDK Build-Tools 29.0.2不接受。

 
UnityEngine. UnityEngine。 GUIUtility:ProcessEvent (int,intptr,bool&)
 GUIUtility: ProcessEvent (int, intptr bool)

FAILURE: Build failed with an exception.
失败:生成失败并出现异常。
* What went wrong:
*问题所在:
Could not determine the dependencies of task ':launcher:compileReleaseJavaWithJavac'.
无法确定任务':launcher:compileReleaseJavaWithJavac'的依赖关系。
> Failed to install the following Android SDK packages as some licences have not been accepted.
>安装以下Android SDK包失败,因为某些许可证未被接受。
build-tools;29.0.2 Android SDK Build-Tools 29.0.2
Android SDK build-tools
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
要构建这个项目,接受SDK许可协议,并使用Android Studio SDK管理器安装缺失的组件。
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
或者,要将许可协议从一个工作站转移到另一个工作站,请参阅http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
使用Android SDK: D: Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
* Try:
*试一试:
Run with --stacktrace option to get the stack trace.
使用——stacktrace选项运行以获取堆栈跟踪。
Run with --info or --debug option to get more log output.
使用——info或——debug选项运行以获得更多日志输出。
Run with --scan to get full insights.
用,扫描得到完整的信息。
* Get more help at https://help.gradle.org
*在https://help.gradle.org获得更多帮助
BUILD FAILED in 3s
3秒内构建失败
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
选择JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.
UnityEngine。
GUIUtility:ProcessEvent (int,intptr,bool&)
GUIUtility: ProcessEvent (int, intptr bool)

CommandInvokationFailure: Gradle build失败。  
D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath " jvmargs = -Xmx4096m assembleRelease”  
 
stderr (  
 
失败:生成失败并出现异常。  
 
*问题所在:  
无法确定任务':launcher:compileReleaseJavaWithJavac'的依赖关系。  
>安装以下Android SDK包失败,因为某些许可证未被接受。  
Android SDK build-tools  
要构建这个项目,接受SDK许可协议,并使用Android Studio SDK管理器安装缺失的组件。  
或者,要将许可协议从一个工作站转移到另一个工作站,请参阅http://d.android.com/r/studio-ui/export-licenses.html  
 
使用Android SDK: D: Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK  
 
*试一试:  
使用——stacktrace选项运行以获取堆栈跟踪。 使用——info或——debug选项运行以获得更多日志输出。 用,扫描得到完整的信息。  
 
*在https://help.gradle.org获得更多帮助  
 
3秒内构建失败  
选择JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8  
]  
stdout (  
 
>配置项目:launcher  
警告:选项设置'android。 enableR8 = false”是弃用。  
它将在5.0版的Android Gradle插件中被删除。  
您将不再能够禁用R8  
警告:指定的Android SDK Build Tools版本(28.0.3)被忽略,因为它低于Android Gradle Plugin 4.0.1的最低支持版本(29.0.2)。  
Android SDK Build Tools 29.0.2将被使用。  
要抑制此警告,请从构建中删除“buildToolsVersion '28.0.3'”。 现在,每个版本的Android gradle Plugin都有一个默认版本的构建工具。  
警告:指定的Android SDK Build Tools版本(28.0.3)被忽略,因为它低于Android Gradle Plugin 4.0.1的最低支持版本(29.0.2)。  
Android SDK Build Tools 29.0.2将被使用。  
要抑制此警告,请从构建中删除“buildToolsVersion '28.0.3'”。 现在,每个版本的Android gradle Plugin都有一个默认版本的构建工具。  
检查包Android SDK Build-Tools 29.0.2在D:\Unity\2020.3.17f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses  
Warning: License for package Android SDK Build-Tools 29.0.2不接受。  
]  

1.解决报错:成功:不使用UnityHUB下载自带的Android模块

?

1.打包成功?

四.操作:2:成功:能够正常打包APK(因为写博客时候崩溃了,导致没有了,所以重新写一下内容)

1.版本:和操作:1:一致

1.主要的步骤

修改companyName、productname

设置一下JDK、SDK,不要使用UnityHUB下载的Android模块

1.运行结果:成功:能够打包APK

  游戏开发 最新文章
6、英飞凌-AURIX-TC3XX: PWM实验之使用 GT
泛型自动装箱
CubeMax添加Rtthread操作系统 组件STM32F10
python多线程编程:如何优雅地关闭线程
数据类型隐式转换导致的阻塞
WebAPi实现多文件上传,并附带参数
from origin ‘null‘ has been blocked by
UE4 蓝图调用C++函数(附带项目工程)
Unity学习笔记(一)结构体的简单理解与应用
【Memory As a Programming Concept in C a
上一篇文章      下一篇文章      查看所有文章
加:2021-09-24 10:56:45  更:2021-09-24 10:57:10 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/28 4:51:13-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码