eclipse编译android的apk发生VFY错误

来源:互联网 发布:unity2d横版rpg源码 编辑:程序博客网 时间:2024/05/22 01:26
1.编译jni和jar包,生成的my.jar放到项目的libs下,成功编译apk

2.运行时出现错误:
  ...
  01-01 23:03:34.803 W/dalvikvm(24777): VFY: unable to resolve static method 6025: Lcom/...Manager;.startService ()V

  ...


3.反编译这个apk (unzip, dex2jar, jar),发现这个方法未被编进去


4.对比引用的my.jar,说明这个包是没有问题的,只是eclipse编译时这个方法未被编进去 


5.Properties -> Libraries -> Add JARs


6.Properties -> BuildPath -> Order and Export -> Select All


0.Enjoy


参考:
eclipse引用第三方jar包,编译后发现第三方jar有个方法未被编译进classes.dex [http://www.oschina.net/question/587911_88748]

android一个纠结的VFY错误 [http://www.cnblogs.com/poe-blog/p/3261386.html]



0 0