问题

Unity打包Android报错,在Converting Java classes to dex-format的时候提示Unable to convert classes into dex format. See the Console for details.
日志输出如下

stderr[warning: Ignoring InnerClasses attribute for an anonymous inner class(xx) that doesn't come with anassociated EnclosingMethod attribute. This class was probably produced by acompiler that did not target the modern .class file format. The recommendedsolution is to recompile the class from source, using an up-to-date compilerand without specifying any "-target" type options. The consequence of ignoringthis warning is that reflective operations on this class will incorrectlyindicate that it is *not* an inner class.......

分析

从Android工程复制过来的libs文件夹里的东西和Unity的有冲突,通常是含有和Unity的classes.jar相同内容的jar文件。
解决办法:

解决办法

检查 Assets\Plugins\Android 下是否有jar重复,比如a.jar和b.jar,虽然文件名字不同,但是里面的类是相同的,这种也会出现上面的报错。
检查下Assets\Plugins\Android\libs目录中是否放置了Unity的classes.jar文件 ,如果有,删掉。
检查AndroidManifest.xml 配置。

更多相关文章

  1. android处理资源文件复制到database区域java
  2. android 获取视频文件第一针 作为封面
  3. Android 打开这个 apk文件
  4. Android 文件读取操作
  5. android生成R.java文件
  6. Android源码快速查找文件、搜索字符串和编译
  7. android中用xml文件设置button的各个状态的图片。
  8. Android 建立文件夹、生成文件并写入文本文件内容

随机推荐

  1. 初识android 自定义控件
  2. [Android问答] 如何获得手机屏幕分辨率?
  3. [转帖]Android软件汉化
  4. android:onClick --new attribute from S
  5. android Immutable bitmap passed to Can
  6. Android涂鸦简单制作
  7. Android第九课 Toast 用法注意事项
  8. Android SSL BKS证书的生成过程
  9. 安卓模拟器设置网速和延迟
  10. 短视频app开源源码android 给图片加文字