Proguard error android, unable to access jar file

左心房为你撑大大i 提交于 2019-12-31 03:11:25

问题


This is the first time I am using progurad and getting the following error on exporting signed apk.

Error: Unable to access jarfile ..\lib\proguard.jar

I uncommented the proguard.config= line

   # To enable ProGuard to shrink and obfuscate your code, uncomment this (available   properties: sdk.dir, user.home):
   proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

But there still seems to be some issue. What is needed to fix it.


回答1:


Sounds like a known bug in ADT 22.6 https://code.google.com/p/android/issues/detail?id=66733

Fortunately, working around that bug is easy. On Windows, simply edit proguard.bat and provide an absolute path to the proguard.jar file.




回答2:


I think the bug happens when you update from an older version of eclipse. A better fix is this:

Find the PROGUARD_HOME environment variable in the Windows system settings. Change it to the proguard directory, e.g.:

C:\Program Files\eclipse-helios\sdk\tools\proguard

Then, exit and restart eclipse so will read the new setting.



来源:https://stackoverflow.com/questions/22498111/proguard-error-android-unable-to-access-jar-file

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