原文网址: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.

 

perhaps some support v4 class or interface was confounded, i tried this and it works

-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment

【转】can't find referenced method 'android.app.RemoteInput[] getRemoteInputs()' in class android.app.Notification$Action的更多相关文章

  1. android中怎么把自己须要的app启动图标集中到一个弹出框中

    先看效果图 这个是我们自己的apk点击之后的效果 下边是布局文件 activity_main.xml主布局文件 <LinearLayout xmlns:android="http:// ...

  2. JavaScript调用App原生代码(iOS、Android)通用解决方案

    实际场景 场景:现在有一个H5活动页面,上面有一个登陆按钮,要求点击登陆按钮以后,唤出App内部的登录界面,当登录成功以后将用户的手机号返回给H5页面,显示出来.这个场景应该算是比较完整的一次H5中的 ...

  3. Android Zygote进程是如何fork一个APP进程的

    进程创建流程 不管从桌面启动应用还是应用内启动其它应用,如果这个应用所在进程不存在的话,都需要发起进程通过Binder机制告诉system server进程的AMS system server进程的A ...

  4. easypermissions拒绝权限后闪退。 java.lang.NoSuchMethodError: No virtual method isStateSaved()Z in class Landroid/support/v4/app/FragmentManager

    Process: com.tazan.cd.streetlight, PID: 18825 java.lang.NoSuchMethodError: No virtual method isState ...

  5. 【android官方文档】与其他App交互

    发送用户到另外一个App YOU SHOULD ALSO READ 内容分享 One of Android's most important features is an app's ability ...

  6. 0.[WP Developer体验Andriod开发]之从零安装配置Android Studio并编写第一个Android App

    0. 所需的安装文件 笔者做了几年WP,近来对Android有点兴趣,尝试一下Android开发,废话不多说,直接进入主题,先安装开发环境,笔者的系统环境为windows8.1&x64. 安装 ...

  7. [Tool] 取得APP的Store URL Scheme (Android、iOS)

    [Tool] 取得APP的Store URL Scheme (Android.iOS) 前言 在企业网站中,如果希望使用URL连结的方式,开启Store APP来下载APP(非网页下载).开发人员可以 ...

  8. 将报表移动端集成到自有移动端app方法【IOS、Android】

    应用场景 用户有自己的app,希望把报表的移动端[本文中以FineReport移动端为例]功能集成到他们的app里面去,而不需要安装两个app.Android端和IOS端的集成接口是不一样的,下面我们 ...

  9. Android 之窗口小部件详解--App Widget

    Android 之窗口小部件详解--App Widget  版本号 说明 作者 日期  1.0  添加App Widge介绍和示例  Sky Wang 2013/06/27        1 App ...

随机推荐

  1. Entity Framework 学习笔记(1)

    开始从头系统地学习Entity Framework,当前的稳定版本为6.1.3,Nuget主页 http://www.nuget.org/packages/EntityFramework/ 微软喜欢把 ...

  2. Linux中的sed

    sed [选项] [动作] 文件 选项:     -n :静默模式.使用-n则只有经过sed处理的那一行.     -e :允许多重编辑:       -f :结果默认输出到终端,使用-f会将结果写在 ...

  3. 【转】Windows10下80端口被PID为4的System占用导致Apache无法启动的分析与解决方案

    昨天刚更新了Windows10,总体上来说效果还是蛮不错的,然而今天在开启Apache服务器的时候却发现,Apache莫名其妙的打不开了,起初以为是权限的问题,于是使用管理员身份的控制台去调用命令ne ...

  4. [CSS]white-space 属性详解

    实例 规定段落中的文本不进行换行: p { white-space: nowrap } 可能的值 值 描述 normal 默认.空白会被浏览器忽略. pre 空白会被浏览器保留.其行为方式类似 HTM ...

  5. WPF学习笔记3——Layout之1

    一.概述 了解XAML的基本之后,进入Layout的学习.Layout,即布局,可能需要用到几种不同的容器.每一种容器都有各自的逻辑.在用户界面的设计过程中,很多时候是在想办法使得界面更加吸引.实在. ...

  6. 软件测试 -- 和用户共同测试(UAT测试)的注意点有哪些

    软件产品在投产前,通常都会进行用户验收测试.如果用户验收测试没有通过,直接结果就是那不到“Money”,间接影响是损害了公司的形象,而后者的影响往往更严重.根据作者的经验,用户验收测试一定要让用户满意 ...

  7. <五> jQuery 效果

    显示隐藏 $("selector").show(speed, callback) $("selector").hide"(speed, callbac ...

  8. appcache checking update

    <!DOCTYPE html> <html manifest="a.appcache"> <head> <title></ti ...

  9. chkconfig用法

    有时候为了方便管理,我们常常喜欢在Linux中将之安装为服务,然后就可以使用服务来管理. 但是当我们运行安装服务的命令时候,假设服务名为myservice #chkconfig --add myser ...

  10. oracle数据库的建表,删除字段,添加字段,修改字段,修改字段......

    1. 使用oracle创建一张表: SQL> create table loginuser( id ,), username ), password ), email ), descriable ...