0

not generate singed apk. but not error when run app.

When running ProGuard on our Application and generate apk we see the following warning.

Warning:com.localytics.android.SessionHandler$15: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
Warning:there were 1 unresolved references to library class members.
     You probably need to update the library versions.
     (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
:app:transformClassesAndResourcesWithProguardForRelease FAILED
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
java.io.IOException: Please correct the above warnings first.

2 Answers2

0

The problem is obviously setLatestEventInfo and a quick search shows this is the result of a bug/deprecation problem. See the links or search "setLatestEventInfo"

Community
  • 1
  • 1
Pomagranite
  • 696
  • 5
  • 11
  • not working (-keep class org.apache.http.** { *; } -dontwarn org.apache.http.** -dontwarn android.net.** ) – jon joni Apr 17 '16 at 07:46
  • You could try putting-keep class org.apache.http.** { *; } -dontwarn org.apache.http.** -dontwarn android.net.** – Pomagranite Apr 17 '16 at 07:46
0

You might have set minifyEnabled = true, if so... then please set below mentioned line in proguard (proguard-rules.pro file).

  -dontwarn android.app.Notification
Frank Nguyen
  • 6,493
  • 3
  • 38
  • 37
Prashant
  • 112
  • 8