Proguard的返回了错误code 1没有任何具体信息 [英] Proguard Returned With Error Code 1 Without Any Specific Information

查看:147
本文介绍了Proguard的返回了错误code 1没有任何具体信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有ProGuard的问题,我已经尝试了许多可能的解决方案,但仍然没有解决我的问题。

我从控制台得到的唯一信息是

  Proguard的错误code 1.见控制台返回

仅此而已,这是我见过一个非常糟糕的错误消息。

我已经设置

  proguard.config = proguard的-project.txt

和没有在proguard的-project.txt,我相信,只有一对夫妇的意见。

 #要在项目中启用的ProGuard,编辑project.properties
#为在该文件中描述的定义proguard.config属性。

#添加项目的具体规则的ProGuard这里。
#默认情况下,此文件中的标志被附加到指定的标志
#在$ {} sdk.dir /tool​​s/proguard/proguard-android.txt
#您可以编辑包含路径和秩序改变的ProGuard
#包括project.properties财产。

#欲了解更多详情,请参阅
#http://developer.android.com/guide/developing/tool​​s/proguard.html#添加任何具体项目保持选择这里:#如果你的项目使用的WebView与JS,取消以下
#并指定完全限定类名给JavaScript接口
#类:
#-keepclassmembers类fqcn.of.javascript.interface.for.webview {
# 上市 *;
#}
#这是ProGuard的一个配置文件。
#http://proguard.sourceforge.net/index.html#manual/usage.html


解决方案

在数小时夫妇寻找解决办法,我找到了解决办法。我刚搬到将proguard.jar到另一个目录其中有路径中没有空格,然后我编辑的/ bin文件夹中proguard.bat到该目录。最终,proguard的运行良好,并给我,我预计错误日志。

示例脚本。

  @ECHO OFFREM启动脚本的ProGuard  - 免费的类文件收缩,优化,
REM混淆和preverifier为Java字节code。REM改变当前目录和驱动器所在的脚本,以避免
REM包含空格的目录问题。
CD / D%〜DP0如果不存在%PROGUARD_HOME%GOTO家
SET PROGUARD_HOME = ..
:家Java的罐子C:\\ BIN \\ proguard.jar%*

I have problem with proguard, I have tried with many possible solutions but still does not solve my problem.

The only information I get from console is

Proguard returned with error code 1. See console

nothing more, this is a really bad error message I ever met.

I have set

proguard.config=proguard-project.txt

and nothing in proguard-project.txt that I believe only a couple of comments.

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html

解决方案

After couples of hours finding the solution, I found the solution. I just moved the proguard.jar to another directory which there is no space in the path, then I edited the proguard.bat in /bin folder to that directory. Eventually, the proguard is running fine and give me the error log that I expected.

Sample script.

@ECHO OFF

REM Start-up script for ProGuard -- free class file shrinker, optimizer,
REM obfuscator, and preverifier for Java bytecode.

rem Change current directory and drive to where the script is, to avoid
rem issues with directories containing whitespaces.
cd /d %~dp0

IF EXIST "%PROGUARD_HOME%" GOTO home
SET PROGUARD_HOME=..
:home

java -jar C:\bin\proguard.jar %*

这篇关于Proguard的返回了错误code 1没有任何具体信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆