yanping0912 2017-01-04 05:52 采纳率: 100%
浏览 1431
已采纳

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

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

 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 2017-01-04 09:17
    关注

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

    -dontwarn com.baidu.**

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化