zoukankan      html  css  js  c++  java
  • 【转】can't find referenced method 'android.app.RemoteInput[] getRemoteInputs()' in class android.app.Notification$Action

    原文网址:http://stackoverflow.com/questions/25508735/cant-find-referenced-method-android-app-remoteinput-getremoteinputs-in-cl

    I am kind of stuck from past 1 week from this issue. I am trying to export my android app for final release but it gives following errror while exporting.

    Proguard returned with error code 1. See console
    [2014-08-26 19:55:11 - ] Note: there were 1281 duplicate class definitions.
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'android.app.RemoteInput[] getRemoteInputs()' in class android.app.Notification$Action
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'android.os.Bundle getExtras()' in class android.app.Notification$Action
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'java.lang.String getGroup()' in class android.app.Notification
    [2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'java.lang.String getSortKey()' in class android.app.Notification

    I am using below entries in my proguard-project.txt file.

    -keepclassmembers class fqcn.of.javascript.interface.for.webview {
    public *;
    }
    -keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
    
    -keepclassmembers class * {
    @com.google.api.client.util.Key <fields>;
    }
    -keep class android.support.v4.** { *; }
    -dontwarn **CompatHoneycomb
    -dontwarn javax.jdo.**
    -dontwarn com.google.api.client.extensions.android.**
    -dontwarn com.google.api.client.googleapis.extensions.android.gms.**
    
    # Needed by google-api-client-android when linking against an older platform version
    
    -dontwarn com.google.api.client.googleapis.extensions.android.**
    
    -injars lib/android-support-v4.jar
    -injars lib/gcm.jar
    -injars lib/google-api-client-1.18.0-rc.jar
    -injars lib/google-api-client-android-1.18.0-rc.jar
    -injars lib/google-http-client-1.18.0-rc.jar
    -injars lib/google-http-client-android-1.18.0-rc.jar
    -injars lib/google-http-client-gson-1.18.0-rc.jar
    -injars lib/google-http-client-jackson2-1.18.0-rc.jar
    -injars lib/google-http-client-jdo-1.18.0-rc.jar
    -injars lib/google-oauth-client-1.18.0-rc.jar
    -injars lib/gson-2.1.jar
    -injars lib/jackson-core-2.1.3.jar
    -injars lib/jsr305-1.3.9.jar
    
    # Needed by google-play-services when linking against an older platform version
    
    -dontwarn com.google.android.gms.**

    I am able to export my .apk file successfully from eclipse if I am using below content in my proguard-project.txt file. BUT when I am installing and running that app in device , it is crashing.

    -keep class android.support.v4.** { *; }   
    -dontwarn android.support.v4.**
    -dontwarn javax.activation.**
    -dontwarn javax.security.**
    -dontwarn java.awt.**
    -libraryjars <java.home>/lib/rt.jar
    -keep class javax.** {*;}
    -keep class com.sun.** {*;}
    -keep class myjava.** {*;}
    -keep class org.apache.harmony.** {*;}
    -keep public class Mail {*;}        
    -dontshrink
    -dontwarn org.mockito.**
    -dontwarn sun.reflect.**
    -dontwarn android.test.**
    -keep class javax.ws.rs.** { *; }
    -dontwarn com.fasterxml.jackson.**
    -dontwarn org.xmlpull.v1.**
    -dontwarn javax.jdo.**
    -dontwarn com.google.api.client.googleapis.extensions.android.gms.**

    Please help me How to fix this. can't I directly export .apk file without using proguard configuration?. Thanks. please let me know if i have to provide more information.

  • 相关阅读:
    Mysql使用指南
    数据库中的脏读、幻读、不可重复读
    数据库分库分表策略
    php匹配html中的日期进行修改并且重新写入html
    程序猿,你也配吃10元的盒饭?
    git excutable file not found in %path%
    html2canvas+jspdf 完美解决html导出且分页 解决图片显示不全问题
    laravel+gatewayworker+layer搭建网页聊天系统1--workerman安装
    ubuntu使用querylist+cron实现每日新闻采集
    Command "make:console" is not defined.
  • 原文地址:https://www.cnblogs.com/wi100sh/p/5541955.html
Copyright © 2011-2022 走看看