精华内容
下载资源
问答
  • 1.1 想解决:Unity2020.3.7f1支持的安卓插件在Unity2019.3.6f1无法运行 二.参考 2.1Unity2019/2020打包安卓步骤以及问题处理(全是干货!) https://blog.csdn.net/qq_33795300/article/details/112787575 ...

    目录

    一、目的

    1.1 想解决:Unity2020.3.7f1支持的安卓插件在Unity2019.3.6f1无法运行

    二.参考

    2.1Unity2019/2020打包安卓步骤以及问题处理(全是干货!)

    三.操作:1:只有建议:安卓进行修改gradle

    3.1 报错

     3.1.1 答:猜测:应该是使用的gradle版本不同

    3.1.1 解答:咨询了一下安卓工程师,插件里面可以进行修改gradle版本,


    一、目的

    1.1 想解决:Unity2020.3.7f1支持的安卓插件在Unity2019.3.6f1无法运行

    二.参考

    2.1Unity2019/2020打包安卓步骤以及问题处理(全是干货!)

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

    1. 总结:都是干货

    三.操作:1:只有建议:安卓进行修改gradle

    3.1 报错

    1. Unity2019.3.6f1和Unity2020.3.7f1对比: 少了一些选项
    2. 打包出来时候,安卓运行会报错,

     

     

    2021-07-09 10:54:45.341 12625-12659/? I/Unity: xzy 查看运行: initBle:failed:UnityEngine.AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/content/ContextCompat;
          at UnityEngine.AndroidJNISafe.CheckException () [0x00096] in <3c22a197ab60454cb70124c69f2248be>:0 
          at UnityEngine.AndroidJNISafe.CallVoidMethod (System.IntPtr obj, System.IntPtr methodID, UnityEngine.jvalue[] args) [0x0000f] in <3c22a197ab60454cb70124c69f2248be>:0 
          at UnityEngine.AndroidJavaObject._Call (System.String methodName, System.Object[] args) [0x00038] in <3c22a197ab60454cb70124c69f2248be>:0 
          at UnityEngine.AndroidJavaObject.Call (System.String methodName, System.Object[] args) [0x00001] in <3c22a197ab60454cb70124c69f2248be>:0 
          at UnityAndAndroid.<Start>b__5_0 () [0x00010] in <d7a6d6b0deca45769d07f9d005483baf>:0  
        (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    2021-07-09 10:54:45.381 12625-12659/? E/Unity: AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/content/ContextCompat;
        java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/content/ContextCompat;
            at com.zhhd.unityblelibrary.UnityBleActivity.checkBluetoothPermission(UnityBleActivity.java:185)
            at com.zhhd.unityblelibrary.UnityBleActivity.initBle(UnityBleActivity.java:135)
            at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
            at com.unity3d.player.UnityPlayer.access$600(Unknown Source)
            at com.unity3d.player.UnityPlayer$f$1.handleMessage(Unknown Source)
            at android.os.Handler.dispatchMessage(Handler.java:101)
            at android.os.Looper.loop(Looper.java:156)
            at com.unity3d.player.UnityPlayer$f.run(Unknown Source)
         Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.content.ContextCompat" on path: DexPathList[[zip file "/data/app/com.zhhd.Unity20190306-2/base.apk"],nativeLibraryDirectories=[/data/app/com.zhhd.Unity20190306-2/lib/arm, /data/app/com.zhhd.Unity20190306-2/ba

     3.1.1 答:猜测:应该是使用的gradle版本不同

     

    3.1.1 解答:咨询了一下安卓工程师,插件里面可以进行修改gradle版本,

    展开全文
  • 1.想知道:如何:Unity2020.3.17f1c1版本打包 二.参考 三.注意 四.操作:1:成功:能够新建工程然后打包APK 1.版本 1.过程 1.解决问题:失败:新建密钥+在OtherSettings中配置好PackageName、Minimun API Level、...

    目录

    一.目的

    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

    展开全文
  • unity2020.3无法搜索到Entities包的原因和解决办法

    当前unity版本

    2020.3.11LTS长期支持版本
    在这里插入图片描述

    原因

    直接在package manager里面搜索无法搜索到,就算是打开了preview package也没有。

    原因是官方在新的unity版本关闭了预览包的访问通道。
    可以看一下官方的博客解释——https://blog.unity.com/technology/package-manager-updates-in-unity-2020-1
    在这里插入图片描述

    git下载

    但是可以通过git下载
    在这里插入图片描述
    输入com.unity.entities就会自动安装。

    同时entities会依赖很多的其他包,也会一同下载。

    在这里插入图片描述

    官方api文档

    当前的版本是0.17.0,不同版本的api更新很大,所以需要查看官方api文档

    参考:
    Unity2020.1中如何安装DOTS的Entities包?

    展开全文
  • Unity2020.3使用DOTS

    千次阅读 2021-04-01 21:40:09
    Unity2020.3安装DOTS 1.首先打开Package Manager 2.我们把Preview和Dependencies打开 方便我们观察 3.加入Hybrid Renderer 在Package Manager左上角的加号上选择Add package from git URL 并填写以下地址 ...

    Unity2020.3安装DOTS

    1.首先打开Package Manager

    在这里插入图片描述

    2.我们把Preview和Dependencies打开 方便我们观察

    在这里插入图片描述
    在这里插入图片描述

    3.加入Hybrid Renderer

    在Package Manager左上角的加号上选择Add package from git URL 并填写以下地址
    com.unity.rendering.hybrid
    在这里插入图片描述
    在这里插入图片描述
    下载需要等待一段时间
    在这里插入图片描述
    在Hybrid Renderer依赖中可以看到0.17最新版的Entities
    在这里插入图片描述
    在Entities包中可以看见依赖了Burst、Jobs等等,显示installed即为安装成功

    测试

    创建一个Cube
    在这里插入图片描述
    为其添加Convert To Entity,将MonoBehaviour转换为Entity
    在这里插入图片描述
    打开Entity Debugger窗口,方便我们观察Entity
    在这里插入图片描述
    最后点击运行按钮
    在这里插入图片描述
    在红色区域未显示Cube
    黄色区域显示Cube
    表明我们已经成功将MonoBehaviour转换为了Entity
    绿色区域为Cube这个Entity具有的Components
    蓝色区域为Chunk使用情况

    5.添加Havok Physics

    在这里插入图片描述

    测试

    为Cube添加Physics Body
    在这里插入图片描述
    点击运行按钮
    观察到Cube受到重力不断下落即为成功

    展开全文
  • 第一次从头整理Unity工程的GradleBuild,总结一下。 1:内容下载 首先是下载安卓环境,直接通过unityHub下载就行,方便。(第一次下载的时候就下了一半就停止了,直接卸载了Unity,重新下载Unity以及AndroidSupport),...
  • 欢迎转载,记得标明来源,如能帮到你...32020.03.17 对应的 Android OpenJDK 4、2020.03.17 对应的 Android NDK 5、2020.03.17 对应的 Android SDK 2、下载失败,没有文件,或文件损坏 3、寻找下载来源 4、Uni.
  • unity2020.3】 运行官方 HoloLens vuforia sample 保姆级教程,手把手教你跑通HoloLens vuforia官方例程
  • Unity代码日记2020.3.22

    2021-03-22 20:32:49
    void OnMouseEnter()//unity自带的功能 { if(turretGo==null&&EventSystem.current.IsPointerOverGameObject()) { renderer.material.color = Color.red; } } void OnMouseExit() { renderer.material.color = ...
  • Unity2020.3.4 Shader Graph

    千次阅读 2021-04-22 09:14:48
    Ctrl+D 节点居中最佳显示:A或 F键 打开节点文档说明:选择节点按 F1 三、Shader Graph简单制作流程 1、创建Shader Graph 2、打开Shader Graph 3、创建节点 这里以2D纹理节点为例 4、开放节点参数 制作完着色器,要...
  • 首先,unity3d 2020版本确实从一些方面进行了更新,但是unity HUB的安装也确实挺麻烦。听说有大神可以绕过HUB,但我没有成功。 其次,unity3d从2018开始,国内外用着两个不同的版本。国内版本主文件加壳,PJ带来...
  • unity BuildingSetting 搭建iis在网页运行 (https://blog.csdn.net/weixin_38484443/article/details/104992512) 请查看此作者连接 Unity在打包后会生成.unityweb文件,会在加载时进行读取,服务器需要添加相关...
  • Unity3D】安装 2020.3.2f1

    千次阅读 2021-05-12 21:16:30
    unity.com 官网 - 注册账号 下载 pub 登陆 - 输入账号, 激活,个人版本/ 回到官网,选择要下载的版本。。。。各种下一步
  • HoloLens2之路-Unity2020.3+MRTK2.7配置

    千次阅读 2021-12-07 19:09:31
      MRTK2.7 已在2021年9月份开始支持Unity2020.3LTS版本,通常而言,Unity2019.4+MRTK2.6 或者 Unity2020.3+MRTK2.7是最佳搭配,不建议混合搭配(如Unity2019.4+MRTK2.7),因为大如微软的巨头也无法保证兼容所有的...
  • urp简单入门(unity2020.3版本)

    千次阅读 2021-06-17 18:10:15
    创建一个空的unity项目 创建一个urp assert 在project setting里,选中创建的urp assert 先在graphics中红框处选一次 再在Quality处选一次(好像不是必要的) camera的属性面板会...
  •   最近从UnityHub下载的Unity下载完Android模块,里边的jdk,sdk信息一直寻找不到,自己下载一直提示版本不对,有点烦躁。 图示: 找到的解决方案: 1.首先找到UnityHub安装的Unity路径下的json文件,如图所示。将...
  • Unity2020.2更新学习

    2021-03-19 10:00:31
    当前安装版本2020.2.6f Hub上下载的版本: 一、视频1 3分钟的亮点介绍 https://www.bilibili.com/video/BV1Gt4y1k7aN?from=search&seid=5567944505460537690  比较感兴趣的功能: 这些Demo项目有下载吗?...
  • <!DOCTYPE html> <html lang="en-us"> <head> <meta charset="utf-8"> <meta ...Unity WebGL Player | xxx</title> <link rel="shortcu.
  • 此功能使 C# 与面向 Android 或 Swift 的 API 进行互操作,此类 API 支持类似功能。 默认接口方法还支持类似于“特征”语言功能的方案。 在更多位置中使用更多模式 模式匹配提供了在相关但不同类型的数据中提供形状...
  • 2D Animation:com.unity.2d.animation 为使用精灵实现骨骼动画提供了所有必要的工具和运行时组件。 2D Pixel Perfect:com.unity.2d.pixel-perfect 2D Pixel Perfect 包中包含 Pixel Perfect Camera 组件,可...
  • 其中之一的解决方案。找到安卓adk目录下面的tools文件夹里package.xml文件,修改其中obsolete="true",替换为obsolete="false" 然后 试试吧。行的话最好,不行的话再搜别的方法去吧。
  • 相机画面合成问题
  • unity版本:2020.3.8f1c1 遇到的问题:不同设置下(inspector下的平台设置),会出现 1. unity里报错“unity File does not contain a valid CIL image” 2.IDE里using Mono.Data.Sqlite;时,报错 the type or ...
  • unity 2020 .1.3使用 Vufoira 制作 AR** 在Unity 的AssetStore里搜索 Vufoira,高版本unity 的AssetStore 是网页版的。 把 Vuforia Core Samples 导入后会出现报错,再把Vuforia Engine 安同样步骤导入。 这个时候...
  • Unity 2020.2 HDRP 新模板

    2021-01-08 08:49:17
    Furioos云平台体验:https://portal.furioos.com/share/935.024
  • 需要:Unity3D+Vuforia Engine 一、安装Vuforia Vuforia的学习(二)Vuforia的安装 Unity Vuforia AR教程之 Vuforia 开发前配置
  • Unity2020安装

    2021-08-22 15:28:58
    一、Unity2020安装文件下载 ...安装完成以后,从上面的链接下载unity2020bd_175039.rar,然后解压压缩包,将目录unity2020bd_175039\crack\Unity\2020.1.0f1中的Unity.exe和Unity_lic.ulf拷贝到Unity2020的安装目
  • 自定义图片的HoloLens2 vuforia识别,学习笔记 unity2020.3 HoloLens2
  • unity3d.com国际版下载

    2021-02-28 12:57:50
    GIT 仓库 https://github.com/AlianBlank/download.unity.com GitHub download.unity.com 为什么创建该仓库? unity3d.com/download 404 ...Unity版本列表....2020 ...3.x ...Unity 2020.x Unity Versio
  • UnityPlayer.dll是计算机z中重要的dll文件,生活中经常需要使用电脑的朋友们应该知道这是什么文件,我们在使用电脑时,由于操作不当或者是电脑出现问题时,通常需要运行某个应用时可能会弹出此文件破损或者是丢失,...
  • Unity2020.1首选项设置了VS2019后双击文件名打不开的解决方法 学习Unity的时候,发现我的VS没有代码提示,于是去找解决方法。 得到的方案为:Unity-编辑-首选项-外部工具-外部脚本编辑器中设置VS2019 设置后发现,...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 347,888
精华内容 139,155
关键字:

unity2020.3中文api手册chrm

友情链接: graph-ts-master-new.zip