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

  • 8
    点赞
  • 34
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值