2014-11-22 21 views
3

我在我的应用程序中导入人行横道。为了保持人行横道代码,我在proguard的-project.txt补充一点:如何在混淆我的项目时保留人行横道代码?

-dontwarn org.chromium.** 
-dontwarn org.xwalk.core.** 

-keep class com.google.common.** {*;} 
-keep class com.googlecode.eyesfree.braille.** {*;} 
-keep class javax.annotation.** {*;} 
-keep class org.chromium.** {*;} 
-keep class org.xwalk.core.** {*;} 

但是,它似乎是错误的。谁能帮我?非常感谢!

+0

http://stackoverflow.com/questions/25469560/ android-proguard-issues-for-release/25470047#25470047相同类型的问题。 – 2014-11-22 12:07:45

回答

1

您需要添加其他的语句:从这里

-keep class org.xwalk.core.** { 
*; 
} 
-keep class org.chromium.** { 
*; 
} 
-keepattributes ** 

-keepattributes * 
+0

我通过将代码移动到'-keep class'区域的头部解决了此问题。对不起我的泳池英语。 :( – 2014-11-27 13:05:07

+0

@frank_hust任何例子? – speedynomads 2015-11-02 12:30:16