Exporting my project, proguard error

Asked

Viewed 161 times

2

Exporting without proguard all occurs normally, but when active this error:

[2014-09-14 01:59:01 - meuapp] Proguard returned with error code 1. See console
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'android.app.RemoteInput[] getRemoteInputs()' in class android.app.Notification$Action
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'android.os.Bundle getExtras()' in class android.app.Notification$Action
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'java.lang.String getGroup()' in class android.app.Notification
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'java.lang.String getSortKey()' in class android.app.Notification
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setLocalOnly(boolean)' in class android.app.Notification$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setGroup(java.lang.String)' in class android.app.Notification$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setGroupSummary(boolean)' in class android.app.Notification$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setSortKey(java.lang.String)' in class android.app.Notification$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder addAction(android.app.Notification$Action)' in class android.app.Notification$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 01:59:01 - meuapp]       You should check if you need to specify additional program jars.
[2014-09-14 01:59:01 - meuapp] Warning: there were 37 unresolved references to classes or interfaces.
[2014-09-14 01:59:01 - meuapp]          You may need to specify additional library jars (using '-libraryjars').
[2014-09-14 01:59:01 - meuapp] Warning: there were 9 unresolved references to program class members.
[2014-09-14 01:59:01 - meuapp]          Your input classes appear to be inconsistent.
[2014-09-14 01:59:01 - meuapp]          You may need to recompile them and try again.
[2014-09-14 01:59:01 - meuapp]          Alternatively, you may have to specify the option 
[2014-09-14 01:59:01 - meuapp]          '-dontskipnonpubliclibraryclassmembers'.
[2014-09-14 01:59:01 - meuapp] java.io.IOException: Please correct the above warnings first.
[2014-09-14 01:59:01 - meuapp]  at proguard.Initializer.execute(Initializer.java:321)
[2014-09-14 01:59:01 - meuapp]  at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-09-14 01:59:01 - meuapp]  at proguard.ProGuard.execute(ProGuard.java:86)
[2014-09-14 01:59:01 - meuapp]  at proguard.ProGuard.main(ProGuard.java:492)
[2014-09-14 02:07:37 - meuapp] Proguard returned with error code 1. See console
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'android.app.RemoteInput[] getRemoteInputs()' in class android.app.Notification$Action
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'android.os.Bundle getExtras()' in class android.app.Notification$Action
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'java.lang.String getGroup()' in class android.app.Notification
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced method 'java.lang.String getSortKey()' in class android.app.Notification
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setLocalOnly(boolean)' in class android.app.Notification$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setGroup(java.lang.String)' in class android.app.Notification$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setGroupSummary(boolean)' in class android.app.Notification$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder setSortKey(java.lang.String)' in class android.app.Notification$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced method 'android.app.Notification$Builder addAction(android.app.Notification$Action)' in class android.app.Notification$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.NotificationCompatApi20$Builder: can't find referenced class android.app.Notification$Action$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput$Builder
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp] Warning: android.support.v4.app.RemoteInputCompatApi20: can't find referenced class android.app.RemoteInput
[2014-09-14 02:07:37 - meuapp]       You should check if you need to specify additional program jars.
[2014-09-14 02:07:37 - meuapp] Warning: there were 37 unresolved references to classes or interfaces.
[2014-09-14 02:07:37 - meuapp]          You may need to specify additional library jars (using '-libraryjars').
[2014-09-14 02:07:37 - meuapp] Warning: there were 9 unresolved references to program class members.
[2014-09-14 02:07:37 - meuapp]          Your input classes appear to be inconsistent.
[2014-09-14 02:07:37 - meuapp]          You may need to recompile them and try again.
[2014-09-14 02:07:37 - meuapp]          Alternatively, you may have to specify the option 
[2014-09-14 02:07:37 - meuapp]          '-dontskipnonpubliclibraryclassmembers'.
[2014-09-14 02:07:37 - meuapp] java.io.IOException: Please correct the above warnings first.
[2014-09-14 02:07:37 - meuapp]  at proguard.Initializer.execute(Initializer.java:321)
[2014-09-14 02:07:37 - meuapp]  at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-09-14 02:07:37 - meuapp]  at proguard.ProGuard.execute(ProGuard.java:86)
[2014-09-14 02:07:37 - meuapp]  at proguard.ProGuard.main(ProGuard.java:492)

my proguard:

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {    
native <methods>;
}

-keepclasseswithmembernames class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembernames class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

Does the error is in proguard?

2 answers

3


I solved my problem by adding in proguard.cfg the following code:

-dontwarn android.support.**

based on that explanation: https://github.com/exmo/equizmo-android/wiki/Ofuscando-aplicativos-Android

"If your project uses the Android Support library, to make use of Fragments and other features of Android version 4.0, Proguard launches several warnings while trying to obfuscate the code. This entry serves for him to ignore these warnings, making the obfuscation conclude successfully. According to the Android documentation itself, it is safe to do this."

0

I would try not to overshadow the Appcompat classes:

-keep class android.support.** { *; }
-keep interface android.support.** { *; }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.