2 yanping0912 yanping0912 于 2017.01.04 13:52 提问

添加了友盟和百度地图 打包报错了 各位大神帮帮忙 小女子先谢谢了!

不打包运行的时候 报错是:

 com.umeng.common.message.c 
 com.driver.sy.app_passenger.R$array
 - App_passenger] Proguard returned with error code 1. See console
[2017-01-04 12:43:21 - App_passenger] Note: there were 362 duplicate class definitions.
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.mapapi.map.WearMapView: can't find superclass or interface android.view.View$OnApplyWindowInsetsListener
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.conn.scheme.LayeredSocketFactory extends or implements program class org.apache.http.conn.scheme.SocketFactory
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.mapapi.map.WearMapView: can't find referenced class android.view.View$OnApplyWindowInsetsListener
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.mapapi.map.WearMapView: can't find referenced class android.view.WindowInsets
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.mapapi.map.WearMapView: can't find referenced class android.view.WindowInsets
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.mapapi.map.WearMapView: can't find referenced method 'void setOnApplyWindowInsetsListener(android.view.View$OnApplyWindowInsetsListener)' in class com.baidu.mapapi.map.WearMapView
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.mapapi.map.WearMapView: can't find referenced class android.view.WindowInsets
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.mapapi.map.WearMapView: can't find referenced class android.view.WindowInsets
[2017-01-04 12:43:21 - App_passenger] Warning: com.baidu.platform.comapi.NativeLoader: can't find referenced field 'java.lang.String[] SUPPORTED_ABIS' in class android.os.Build
[2017-01-04 12:43:21 - App_passenger] Warning: library class android.webkit.WebView depends on program class android.net.http.SslCertificate
[2017-01-04 12:43:21 - App_passenger] Warning: library class android.webkit.WebView depends on program class android.net.http.SslCertificate
[2017-01-04 12:43:21 - App_passenger] Warning: library class android.webkit.WebViewClient depends on program class android.net.http.SslError
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.conn.ssl.SSLSocketFactory depends on program class org.apache.http.conn.scheme.HostNameResolver
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.conn.ssl.SSLSocketFactory depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-04 12:43:21 - App_passenger]       You should check if you need to specify additional program jars.
[2017-01-04 12:43:21 - App_passenger] Warning: there were 6 unresolved references to classes or interfaces.
[2017-01-04 12:43:21 - App_passenger]          You may need to specify additional library jars (using '-libraryjars').
[2017-01-04 12:43:21 - App_passenger] Warning: there were 18 instances of library classes depending on program classes.
[2017-01-04 12:43:21 - App_passenger]          You must avoid such dependencies, since the program classes will
[2017-01-04 12:43:21 - App_passenger]          be processed, while the library classes will remain unchanged.
[2017-01-04 12:43:21 - App_passenger] Warning: there were 2 unresolved references to program class members.
[2017-01-04 12:43:21 - App_passenger]          Your input classes appear to be inconsistent.
[2017-01-04 12:43:21 - App_passenger]          You may need to recompile them and try again.
[2017-01-04 12:43:21 - App_passenger]          Alternatively, you may have to specify the option 
[2017-01-04 12:43:21 - App_passenger]          '-dontskipnonpubliclibraryclassmembers'.
[2017-01-04 12:43:21 - App_passenger] Error: Please correct the above warnings first.

proguard-rules.txt内容如下:

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

-dontwarn com.ut.mini.**
-dontwarn okio.**
-dontwarn com.xiaomi.**
-dontwarn com.squareup.wire.**
-dontwarn android.support.v4.**

-keepattributes *Annotation*

-keep class android.support.v4.** { *; }
-keep interface android.support.v4.app.** { *; }

-keep class okio.** {*;}
-keep class com.squareup.wire.** {*;}

-keep class com.umeng.message.protobuffer.* {
        public <fields>;
        public <methods>;
}
-keep class com.umeng.message.* {
    public <fields>;
    public <methods>;
}

-keep class org.android.agoo.impl.*{
    public <fields>;
    public <methods>;
}

-keep class org.android.agoo.service.* {*;}

-keep class org.android.spdy.**{*;}

-keep public class com.umeng.message.example.R$*{
   public static final int *;
}

![![![图片说明](https://img-ask.csdn.net/upload/201701/04/1483509101_972911.png)图片说明](https://img-ask.csdn.net/upload/201701/04/1483509091_99643.png)图片说明](https://img-ask.csdn.net/upload/201701/04/1483509080_828721.png)图片说明

4个回答

xzz_6767
xzz_6767   2017.01.04 17:17
已采纳

加入百度的混淆配置,百度地图官网http://lbsyun.baidu.com/index.php?title=androidsdk/guide/buildproject有
配置如下:
-keep class com.baidu.** {*;}
-keep class vi.com.** {*;}

-dontwarn com.baidu.**

xzz_6767
xzz_6767 回复yanping0912: 把每个jar包对应的混淆配置加上,一般官网就有介绍怎么混淆
一年多之前 回复
yanping0912
yanping0912 加了你说的这个百度配置 打包结果如下:
一年多之前 回复
yanping0912
yanping0912   2017.01.04 13:50

图片说明

yanping0912
yanping0912   2017.01.04 13:51

图片说明图片说明

yanping0912
yanping0912   2017.01.05 21:16

[2017-01-05 21:08:19 - App_passenger] Proguard returned with error code 1. See console
[2017-01-05 21:08:19 - App_passenger] Note: there were 362 duplicate class definitions.
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.conn.scheme.LayeredSocketFactory extends or implements program class org.apache.http.conn.scheme.SocketFactory
[2017-01-05 21:08:19 - App_passenger] Warning: library class android.webkit.WebView depends on program class android.net.http.SslCertificate
[2017-01-05 21:08:19 - App_passenger] Warning: library class android.webkit.WebView depends on program class android.net.http.SslCertificate
[2017-01-05 21:08:19 - App_passenger] Warning: library class android.webkit.WebViewClient depends on program class android.net.http.SslError
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.conn.ssl.SSLSocketFactory depends on program class org.apache.http.conn.scheme.HostNameResolver
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.conn.ssl.SSLSocketFactory depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger] Warning: library class org.apache.http.params.HttpConnectionParams depends on program class org.apache.http.params.HttpParams
[2017-01-05 21:08:19 - App_passenger]       You should check if you need to specify additional program jars.
[2017-01-05 21:08:19 - App_passenger] Warning: there were 18 instances of library classes depending on program classes.
[2017-01-05 21:08:19 - App_passenger]          You must avoid such dependencies, since the program classes will
[2017-01-05 21:08:19 - App_passenger]          be processed, while the library classes will remain unchanged.
[2017-01-05 21:08:19 - App_passenger] Error: Please correct the above warnings first.

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
求助各位高手,帮忙做下,谢谢了
由计算机“想”一个四位数,请人猜出这个四位数是多少。人输入四位数字后,计算机首先判断这四位数字有几位是猜对了,并且在对的数字中又有几位位置也是对的,将结果显示出来,给人以提示,请人再猜,直到人猜出计算机所想的四位数是多少时为止。 
帮帮忙 谢谢了
大家好,我是个新手现在想学习 Delphi  以前学习过一点VB现在感觉不好用想请大家帮帮忙!!!同时我在这十分希望和高手交个朋友我的QQ   657674361邮箱是xiaotian8202@126.com
vs2010水晶报表问题,请各位高手帮帮忙,先谢谢了
我有一张地区表  City (cityid ,parentid,cityname)还有一张销售记录表 Sale(SaleDate,Amount,CityID),现在先要用水晶报表做一个销售统计,想要显示这样的效果并且在最左边再加上销售日期,那个总销售额是每个区的总额,是以省份来分组的,省市和总销售额这两列不是数据库中的字段,该怎么用水晶报表来实现呢,请各位高手指教,本人是新手,刚刚接触水晶报表,还
帮帮忙!!!O(∩_∩)O~谢谢了
 谢谢关注。。我刚刚申请了账号,还不是很了解!不过我听说在这可以交流、可以学习,所以我就迫不及待的来了!我学的是c#,可是我现在想学java,不知道难不难,谁知道不错的Java入门的电子书给介绍一个!!!!!谢谢~~~~~还有没事常联系!嘿嘿........
添加一定时器,,,,请求大神们帮帮忙,谢谢了
package myservlet.control;import mybean.data.*;import java.sql.*;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class HandleLogin extends HttpServlet{     public void init(...
请各位大神看看为啥出错了!
-
大神帮忙 谢谢了 求哪里错了 新手 问题有点幼稚 谢谢了
代码如下: #include int main(void) { float score ; printf("请输入考试成绩: "); scanf("%f", &score); if(score>100) printf("你这是在做梦!!!"); else if(score>=90) //多了“”,if(score>=
请各位大虾帮忙!小女子谢过了!:)
我不明白。。。为什么在JSP的中输出流有的时候是out.println( )有的时候是System.out.println( ),什么情况用哪个呢。。请各位大虾帮忙!小女子谢过了!:)
哪个高手帮帮忙啊,谢谢了
我是个vc++一个初学  想写个基于对话框的   演示2分法的程序,我用静态控件,但是它不和其他控件一样可以设置变量,还有就是想用个光标指示,不知道光标怎么出现?谢谢
高手帮我看看那里错了,谢谢了!
2010-5-2 23:15:37org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet GetBlogServlet threw exceptionjava.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util