- 1.CommandInvokationFailure: Unable to convert classes into dex format. C:/Program Files (x86)/Java/jdk1.8.0_73\bin\java.exe -Xmx10 -Dcom.android.sdkmanager.toolsdir="D:/android-sdk-windows244\tools" -Dfile.encoding=UTF8 -jar "D:\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
一般此类错误发生的原因有三种:(1)bin文件夹和libs文件夹中添加了不该添加的jar包; (2)jdk版本问题 是否需要安装最新的jdk来解决 - ArgumentException: The Assembly System.Configuration is referenced by System.Data ('Assets/Plugins/Android/System.Data.dll'). But the dll is not allowed to be included or could not be found.
点击Player Settings按钮,找到Api Compatibility Level选项,选择”.Net 2.0”,而非”.Net 2.0 Subset” - apk包打开后提示 找不到unity的activity
解决办法:可能是当前版本的picosdk unity版本不支持 更新 pico版本 此类问题一般出现在 介入picosdk版本太低所致。 - Caused by: java.lang.NoSuchMethodError: No direct method <init>(Landroid/content/ContextWrapper;)V in class Lcom/unity3d/player/UnityPlayer; or its super classes (declaration of 'com.unity3d.player.UnityPlayer' appears in /data/app/com.growlib.tread-1/base.apk)
打包后 执行apk遇到崩溃的情况 卸载重新安装 或者 jar有问题 -
ArgumentException: The Assembly System.Configuration is referenced by System.Data ('Assets/Plugins/Android/System.Data.dll'). But the dll is not allowed to be included or could not be found.
In Build Settings > Player Settings > API Compatibility Level, change the .NET setting.Then try to build again and see if the error goes away or changes. -
unity打包安卓apk 代码中使用HHTP请求时,有时候会抛出异常
System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.WebRequest ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Configuration.ExeConfigurationHost'.
此问题的解决办法是,此选项选成disabled 或者 link.XML手动排除不能被剥离的部分(剥离写法百度)
StrippingLevel是用来减少打包出来的player的体积
unity打包安卓apk 奇葩错误总结
最新推荐文章于 2024-10-10 22:03:28 发布