今天升级了ADT到ADT 22.6.1,打包混淆的时候就出现了问题

时间:2020-12-16 00:13:22
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" %*
 
再次进行打包混淆,没有出现异常