Unity导出APk出错解决方法二
生活随笔
收集整理的這篇文章主要介紹了
Unity导出APk出错解决方法二
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
錯(cuò)誤提示(需得打開編輯器log文件才能看到全部log,Unity3d只顯示一部分):
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. C:/Program Files/Java/jdk1.8.0_05\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="F:\adt-bundle-windows-x86_64\sdk\tools" -Dfile.encoding=UTF8 -jar "D:\develop\Unity5.3.7\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -warning: Ignoring InnerClasses attribute for an anonymous inner class (com.tendcloud.tenddata.game.ae) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class.rouble writing output: Too many method references to fit in one dex file: 67088; max is 65536. You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large. References by package:4 android.accessibilityservice4 android.accounts106 android.animation451 android.app17 android.app.job2 android.appwidget53 android.arch.core.internal105 android.arch.lifecycle1 android.bluetooth241 android.content55 android.content.pm111 android.content.res58 android.database25 android.database.sqlite256 android.graphics130 android.graphics.drawable3 android.graphics.drawable.shapes3 android.graphics.pdf35 android.hardware5 android.hardware.display11 android.hardware.fingerprint24 android.location259 android.media19 android.media.browse92 android.media.session69 android.net6 android.net.http7 android.net.nsd16 android.net.wifi2 android.nfc2 android.nfc.cardemulation71 android.opengl311 android.os1 android.preference28 android.print5 android.print.pdf18 android.provider8 android.renderscript9 android.security6 android.security.keystore10 android.service.media31 android.support.annotation14 android.support.compat153 android.support.constraint125 android.support.constraint.solver375 android.support.constraint.solver.widgets14 android.support.coreui14 android.support.coreutils216 android.support.customtabs16 android.support.design309 android.support.design.internal1527 android.support.design.widget14 android.support.fragment335 android.support.graphics.drawable14 android.support.graphics.drawable.animated14 android.support.mediacompat843 android.support.transition?
解決方法:
1.去掉不需要的jar包
2.導(dǎo)出android studio工程使用多個(gè)multi-dex:true 選項(xiàng)
官方文檔解決64k限制方法:https://developer.android.com/studio/build/multidex
相關(guān)文章?https://medium.com/@abhpatidar/solving-unity-dex-issue-538e134c8809
?
轉(zhuǎn)載于:https://www.cnblogs.com/mttnor/p/9961855.html
總結(jié)
以上是生活随笔為你收集整理的Unity导出APk出错解决方法二的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 好久没有处理过故障了
- 下一篇: inotify+rsync实时同步服务部