扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
今天就跟大家聊聊有关如何解决android代码混淆报错java.io.IOException: Please correct the above,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
创新互联建站专注于企业营销型网站、网站重做改版、开平网站定制设计、自适应品牌网站建设、H5高端网站建设、商城网站建设、集团公司官网建设、外贸营销网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为开平等各大城市提供网站开发制作服务。
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.event.KeyAdapter
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.event.KeyEvent
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.Dialog
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.event.KeyAdapter
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.event.KeyEvent
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.Dialog
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.event.KeyEvent
[2012-06-01 14:06:03 - geoTest6.3] Warning: org.apache.log4j.lf5.viewer.LogFactor5InputDialog$1: can't find referenced class java.awt.event.KeyEvent
[2012-06-01 14:06:03 - geoTest6.3] You should check if you need to specify additional program jars.
[2012-06-01 14:06:03 - geoTest6.3] Warning: there were 1773 unresolved references to classes or interfaces.
[2012-06-01 14:06:03 - geoTest6.3] You may need to specify additional library jars (using '-libraryjars'),
[2012-06-01 14:06:03 - geoTest6.3] or perhaps the '-dontskipnonpubliclibraryclasses' option.
[2012-06-01 14:06:03 - geoTest6.3] Warning: there were 1 instances of library classes depending on program classes.
[2012-06-01 14:06:03 - geoTest6.3] You must avoid such dependencies, since the program classes will
[2012-06-01 14:06:03 - geoTest6.3] be processed, while the library classes will remain unchanged.
[2012-06-01 14:06:03 - geoTest6.3] java.io.IOException: Please correct the above warnings first.
[2012-06-01 14:06:03 - geoTest6.3] at proguard.Initializer.execute(Initializer.java:308)
[2012-06-01 14:06:03 - geoTest6.3] at proguard.ProGuard.initialize(ProGuard.java:210)
[2012-06-01 14:06:03 - geoTest6.3] at proguard.ProGuard.execute(ProGuard.java:85)
[2012-06-01 14:06:03 - geoTest6.3] at proguard.ProGuard.main(ProGuard.java:499)
[2012-06-01 14:12:33 - geoTest6.3] Proguard returned with error code 1. See console
解决办法:因为采用了三方的jar包,需要我们在 proguard.cfg 中添加"-dontwarn"
如下:
proguard.cfg 全部配置
-dontwarn
-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
}
-keepclasseswithmembers class * {
public
}
-keepclasseswithmembers class * {
public
}
-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 *;
}
可解决!
看完上述内容,你们对如何解决android代码混淆报错java.io.IOException: Please correct the above有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注创新互联行业资讯频道,感谢大家的支持。
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流