Android project failed to export apk after proguard obfuscate

早过忘川 提交于 2019-12-11 15:38:55

问题


Using Android SDK Tools R15 and ADT 15 with Eclipse. But I'm stuck by Conversion to Dalvik format failed with error 1 when export the project to apk file with proguard on(It runs sucessfully with proguard off).

And I found this site.

Then I clean and rebuild my project but it makes no sense. And I have also tried to create a new Android project with all referenced jars of my project and then use the same proguard.cfg to obfuscate the code and export. But everything works well in the test project.

There isn't any error details printed on the terminal of Eclipse so I can't decide the problem.


It is -keepattributes LocalVariableTable makes proguard produce malformed code.


回答1:


This question has been asked several times before:

  • Conversion to Dalvik format failed with error 1 Solution?
  • Eclipse gives “Conversion to Dalvik format failed” while ant works
  • Android SDK tools revision 12 has problem with Proguard
  • “Conversion to Dalvik format failed with error 1” on external Jar

Chances are the problem will go away if you update the old version of proguard.jar in the Android SDK with the latest version (4.6 or 4.7) from the official ProGuard site at Sourceforge.



来源:https://stackoverflow.com/questions/8470819/android-project-failed-to-export-apk-after-proguard-obfuscate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!