Недавно мы перешли от бесплатной библиотеки карт Google к картам для работы. Я изменил импорт с com.google.android.gms.maps
на com.google.android.m4b.maps
и импортировал скомпилированную библиотеку aar. У нас есть действующая лицензия.Настройки Android Proguard для Карт Google для работы
Единственное, что я не нашел в документах, это настройки proguard, и у меня возникают проблемы с ним. После некоторых исследований я сделал конфигурацию «слепой догадок» с добавлением строк:
-dontwarn sun.misc.Unsafe
-keep class com.google.android.m4b.common.** { *; }
-keep class com.google.android.m4b.ads.identifier.** { *; }
-keep class com.google.android.m4b.maps.** { *; }
-keep class com.google.android.m4b.** { *; }
-keep class com.google.android.geo.** { *; }
-keep class android.support.v4.** { *; }
-keepattributes InnerClasses
-dontoptimize
Он компилирует каким-то образом (APK создается), но Gradle еще возвращает ошибку:
AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
AGPBI: {"kind":"error","text":"(com.google.android.m4b.maps.ca.a) that doesn\u0027t come with an","sources":[{}]}
AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]}
Во всяком случае, я не» я хочу полагаться на слепую догадку, и я не эксперт по защите. Есть ли официальное руководство для карт для работы?
Если нет - какие строки над «угадываемой» конфигурацией proguard мне нужно сохранить, чего мне не хватает, а какие строки я могу от них избавиться?