码迷,mamicode.com
首页 > 移动开发 > 详细

【转】can't find referenced method 'android.app.RemoteInput[] getRemoteInputs()' in class android.app.Notification$Action

时间:2016-05-30 12:54:23      阅读:368      评论:0      收藏:0      [点我收藏+]

标签:

原文网址: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: cant find referenced class android.app.Notification$Action$Builder
[2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: cant find referenced class android.app.Notification$Action$Builder
[2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: cant find referenced class android.app.Notification$Action$Builder
[2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: cant find referenced class android.app.Notification$Action$Builder
[2014-08-26 19:55:11 - ] Warning: android.support.v4.app.NotificationCompatApi20: cant 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.

【转】can't find referenced method 'android.app.RemoteInput[] getRemoteInputs()' in class android.app.Notification$Action

标签:

原文地址:http://www.cnblogs.com/wi100sh/p/5541955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!