Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Note: com.google.common.cache.Striped64 accesses a declared field 'base' dynamically

I am using ProGuard with my Android Studio Project. When I build my release I get the following note:

Note: com.google.common.cache.Striped64 accesses a declared field 'base' dynamically
      Maybe this is program field 'com.google.common.cache.Striped64 { long base; }'
      Maybe this is program field 'org.jsoup.nodes.Entities { java.util.Map base; }'
      Maybe this is program field 'org.jsoup.nodes.Entities$EscapeMode { org.jsoup.nodes.Entities$EscapeMode base; }'

I tried to solve it with:

-keep class org.jsoup.** { *; }
-keeppackagenames org.jsoup.nodes
-keep class com.google.common.cache.Striped64 { *; }
-keep class com.google.common.base.** { *; }

but it did not help.

How do I resolve this Note?

like image 210
stephan1002 Avatar asked Oct 12 '15 01:10

stephan1002


1 Answers

To fix this you have to provide the following to your proguard configuration:

-keepclassmembers class ** {
  ** base;
}

This simply means do not rename all members named "base" of any type in any class.

Works like a charm.

like image 67
Basil Musa Avatar answered Sep 24 '22 15:09

Basil Musa