Proguard的回报,错误code 1 proguard.ParseException [英] Proguard return with error code 1 proguard.ParseException

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

问题描述

我想我的Andr​​oid项目导出到APK,并同时建立对我控制台得到这个错误,我通过谷歌骑车,但我没有发现任何这样的错误:

I tried to export my android project to apk, and while building i got this error on Console, i cycled through google, but I didn't find any error like this:

[2013-09-24 18:09:42 - Google] Proguard returned with error code 1. See console
[2013-09-24 18:09:42 - Google] proguard.ParseException: Expecting jar or directory name    before '-include' in argument number 3
[2013-09-24 18:09:42 - Google]  at proguard.ConfigurationParser.readNextWord(ConfigurationParser.java:1133)
[2013-09-24 18:09:42 - Google]  at proguard.ConfigurationParser.parseClassPathArgument(ConfigurationParser.java:249)
[2013-09-24 18:09:42 - Google]  at proguard.ConfigurationParser.parse(ConfigurationParser.java:130)
[2013-09-24 18:09:42 - Google]  at proguard.ProGuard.main(ProGuard.java:484)

这是我proguard.cfg文件:

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-dontskipnonpubliclibraryclassmembers
-libraryjars

任何帮助将是AP preciate!

Any help would be appreciate!

推荐答案

在配置文件中的最后行指定选项 -libraryjars 没有预期的说法。在任何情况下,应删除这一行,因为Android编译过程中会自动指定您所需的-injars / -outjars / -libraryjars选项。

The last line in your configuration file specifies the option -libraryjars without the expected argument. In any case, you should remove this line, since the Android build process automatically specifies the necessary -injars/-outjars/-libraryjars options for you.

请注意,最近Android SDK的版本已经取消precated proguard.cfg 支持的文件 proguard的-project.txt 这基本上是空的,在一个共享的内部配置文件批量配置的(都在指定的 project.properties )。

Note that recent versions of the Android SDK have deprecated proguard.cfg in favor of a file proguard-project.txt that is essentially empty, with the bulk of the configuration in a shared internal configuration file (all specified in project.properties).

这篇关于Proguard的回报,错误code 1 proguard.ParseException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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