本文主要是介绍Error: Unable to access jarfile ..\lib\proguard.jar,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
今天无意升级了ADT到ADT 22.6,打包混淆的时候就出现了问题:
Proguard returned with error code 1. See console
Error: Unable to access jarfile ..\lib\proguard.jar
一直找不到问题的解决方案,后来我把proguard(下载地址:http://sourceforge.net/projects/proguard/files/proguard/)也升级到最新版还是不行。
后来我仔细看了一下报错信息,我觉的是路径的问题,我就试着将
D:\android-sdk-windows\tools\proguard\bin\proguard.bat 打开内容如下:
@ECHO OFF
REM Start-up script for ProGuard -- free class file shrinker, optimizer,
REM obfuscator, and preverifier for Java bytecode.
REM
REM Note: when passing file names containing spaces to this script,
REM you'll have to add escaped quotes around them, e.g.
REM "\"C:/My Directory/My File.txt\""
IF EXIST "%PROGUARD_HOME%" GOTO home
SET PROGUARD_HOME=..
:home
java -jar "%PROGUARD_HOME%\lib\proguard.jar" %*
我试着改了一下
@ECHO OFF
REM Start-up script for ProGuard -- free class file shrinker, optimizer,
REM obfuscator, and preverifier for Java bytecode.
REM
REM Note: when passing file names containing spaces to this script,
REM you'll have to add escaped quotes around them, e.g.
REM "\"C:/My Directory/My File.txt\""
IF EXIST "%PROGUARD_HOME%" GOTO home
SET PROGUARD_HOME="D:\android-sdk-windows\tools\proguard"
:home
java -jar "%PROGUARD_HOME%\lib\proguard.jar" %*
再次进行打包混淆,没有出现异常
这篇关于Error: Unable to access jarfile ..\lib\proguard.jar的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!