2017-03-23 10 views

答えて

1

を解決する方法

minifyEnabled = "true" -- I don't want this to be set to false. 

を設定しています。これらのエラーから、あなたはRealmとGsonのルールが必要だと思います。ここでは、PS

# Proguard Configuration for Realm (http://realm.io) 
# For detailed discussion see: https://groups.google.com/forum/#!topic/realm-java/umqKCc50JGU 
# Additionally you need to keep your Realm Model classes as well 
# For example: 
-keep class com.yourapppackagetomodelclass.realm.** { *; } 
-keep class io.realm.annotations.RealmModule 
-keep @io.realm.annotations.RealmModule class * 
-keep class io.realm.internal.Keep 
-keep @io.realm.internal.Keep class * 
-dontwarn javax.** 
-dontwarn io.realm.** 

##---------------Begin: proguard configuration for Gson ---------- 
# Gson uses generic type information stored in a class file when working with fields. Proguard 
# removes such information by default, so configure it to keep all of it. 
-keepattributes Signature 

# For using GSON @Expose annotation 
-keepattributes *Annotation* 

# Gson specific classes 
-keep class sun.misc.Unsafe { *; } 
#-keep class com.google.gson.stream.** { *; } 

# Application classes that will be serialized/deserialized over Gson 
-keep class com.google.gson.examples.android.model.** { *; } 

# Prevent proguard from stripping interface information from TypeAdapterFactory, 
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) 
-keep class * implements com.google.gson.TypeAdapterFactory 
-keep class * implements com.google.gson.JsonSerializer 
-keep class * implements com.google.gson.JsonDeserializer 

##---------------End: proguard configuration for Gson ---------- 

です:代わりにcom.yourapppackagetomodelclass.realmRealmObjectのクラスは、あなたがこのように使用、利用可能なオンラインでProGuardのルールをチェックし、もしことができない店舗IBMの警告については

UPDATE どこあなたのパッケージを使用します

-keepclassmembers com.ibm.mce.sdk.adm.** { *; } 
-keepclassmembers ibm.mce.sdk.plugin.inapp.** { *; } 
+0

そのためには、使用しているライブラリについて言及するか、更新された回答を参照する必要があります。 –

+1

@ user45678 MCE SDKライブラリーの場合は、https://developer.ibm.com/answers/questions/356328/what-is-the-recommended-proguard-configuration-for-1.htmlを参照してください。 –