2

I recently started getting this error in certain scenarios at run time in my app...

I have already tried the following :

  1. Add proguard rules to include com.google.common.
  2. Mutlidex rules so that all the classes get packaged in main dex file
  3. I have checked the apk contents to make sure the classes are present in the dex file...
  4. Updgraded my guava android lib to latest 27.0.0-android
  5. Updated gradle plugin and gradle version to the latest

AndroidRuntime: java.lang.NoSuchMethodError: No static method checkArgument(ZLjava/lang/String;I)V in class Lcom/google/common/base/Preconditions; or its super classes (declaration of 'com.google.common.base.Preconditions' appears in /data/app/com.myapp.dev.test-Xip2SNDMljPc2_BN0p3iRg==/base.apk!classes2.dex) 03-26 13:49:19.167 14658 14751 E AndroidRuntime: at com.google.common.util.concurrent.RateLimiter.checkPermits(RateLimiter.java:424) 03-26 13:49:19.167 14658 14751 E AndroidRuntime: at com.google.common.util.concurrent.RateLimiter.tryAcquire(RateLimiter.java:341) 03-26 13:49:19.167 14658 14751 E AndroidRuntime: at com.google.common.util.concurrent.RateLimiter.tryAcquire(RateLimiter.java:325)

Not sure where to go from here now. Any ideas what else can I do ?

shizhen
  • 12,251
  • 9
  • 52
  • 88
vinzzz
  • 2,084
  • 2
  • 14
  • 23

1 Answers1

0

Try to add below proguard configuration

-keep class com.google.common.base.**
shizhen
  • 12,251
  • 9
  • 52
  • 88
  • did not work :( .. I see that both the base and util classes are in main dex file ... even then – vinzzz Mar 29 '19 at 18:36