android代码混淆报错总结:java.io.IOException: Please correct the above

转载 2013年12月03日 17:58:24

http://www.cnblogs.com/zfrr/archive/2012/06/01/2530744.html

 

android代码混淆报错总结:java.io.IOException: Please correct the above warnings first

 

[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 <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 *;
}

可解决! 

 

【转】java.lang.NoClassDefFoundError

在升级ADT 18版本后,在编译载有友盟SDK后出现如下错误, E/AndroidRuntime(497): java.lang.NoClassDefFoundError: com.mobclick...

android轻量级缓存框架ASimpleCache分析

框架地址 https://github.com/yangfuhai/ASimpleCache  此框架作者为大名鼎鼎的afinal作者 官方简介: ASimpleCache 是一个为and...

Android Studio 混淆打包 IOException: Please correct the above warnings first

Android studio 混淆打包时,出现Error:Execution failed for task ':app:proguardRelease'. > java.io.IOExcept...

Gradle build报错:Please correct the above warnings first解决方案

转载:gradle build报错:Please correct the above warnings first解决方案问题描述:在编译的时候,出现了下面的错误提示Warning: there we...

Maven报错Please ensure you are using JDK 1.4 or above and not a JRE解决方法!

在eclipse下用maven编译时,很有可能出现以下错误: Please ensure you are using JDK 1.4 or above and not a JRE (the com...

tomcat异常关闭后再启动报错:IOException while loading persisted sessions: java.io.EOFException

上午在eclipse中调试项目时,tomcat异常关闭了,再次启动服务,报 IOException while loading persisted sessions: java.io.EOFExcep...

hadoop报错java.io.IOException: Bad connect ack with firstBadLink as 192.168.1.218:50010

今天再测试的时候报错了[root@linuxmain hadoop]# bin/hadoop jar hdfs3.jar com.dragon.test.CopyToHDFSJava HotSpot(...

Gradle报错:java.io.IOException: Unable to establish loopback connection

先说下问题原因: 总结起来就是jvm无法访问127.0.0.1 有可能出现的情况: 1.java被禁网了。。。。我就是这样浪费了三天时间 2.防火墙问题 3.ipv6的问题 …其他的反正跟网络有...

MyBatis配置报错java.io.IOException: Could not find resource mybatis-conf.xml

参考:http://blog.csdn.net/u010648555/article/details/70880425 本人用的也是IDEA,maven搭建的项目。 项目目录如下: ...

Tomcat启动报错:IOException while loading persisted sessions: java.io.EOFException

- IOException while loading persisted sessions: java.io.EOFException java.io.EOFException     at j...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:android代码混淆报错总结:java.io.IOException: Please correct the above
举报原因:
原因补充:

(最多只允许输入30个字)