Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stack size becomes negative after instruction

It has been pointed out that the reason I am having this problem is because of proguard 4.9, so I went ahead and updated to proguard-5.2.1. But I am still having the same problem. Has anyone found a solution? I confirmed the new version through

 java -jar /projects/tools/android-sdk-macosx/tools/proguard/lib/proguard.jar

and my proguard-rule.pro is simply

#---- Google Cloud Endpoint section
# Needed by google-api-client to keep generic types and @Key annotations accessed via reflection
-keepclassmembers class * {
  @com.google.api.client.util.Key <fields>;
}
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
-dontwarn com.google.api.client.**
-dontwarn com.google.common.**

#---- Twitter
-include ../proguard-com.twitter.sdk.android.twitter.txt
-dontwarn okio.**

#---- Remove Logging

    -assumenosideeffects class android.util.Log {
    
  public static int v(...);
  public static int i(...);
  public static int w(...);
  public static int d(...);
    
  public static int e(...);

    }

#---- support design
-dontwarn android.support.design.**

#---- Google ILicencingService
-keep public class com.google.vending.licensing.ILicensingService
    
-keep public class com.android.vending.licensing.ILicensingService
    
    

The error lines is

Error:java.lang.IllegalArgumentException: Stack size becomes negative after instruction [72] invokestatic #16 in [com/path/android/jobqueue/BaseJob.safeRun(I)Z]

Thanks for any hints.

CORRECTION

Since I am using Android Studio, it sounds like I have to deal with the Proguard plugin. How do I update the plugin? Maybe that might help.

like image 829
learner Avatar asked Nov 08 '15 15:11

learner


1 Answers

As an option, you can change the build.gradle from

proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-project.txt'

to

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'

to turn off optimizations.

like image 58
ezaspi Avatar answered Sep 20 '22 00:09

ezaspi