tenor sdk 的混淆规则

proguard rules for tenor sdk

任何人都可以为 Tenor Sdk android 提供 proguard 规则吗? git 上没有为 sdk 提供规则。 git 存储库的 link 是:

https://github.com/Tenor-Inc/tenor-android-core

以下是我遇到的崩溃异常:

FATAL EXCEPTION: main
                                                   Process: com, PID: 14520
                                                   java.lang.RuntimeException: Unable to start activity ComponentInfo{com/com.ui.activities.GifListActivity}: java.lang.IllegalArgumentException: Unable to create converter for class com.tenor.android.core.d.a.c
                                                       for method d.a
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
                                                       at android.app.ActivityThread.access0(ActivityThread.java:157)
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:148)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5525)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
                                                    Caused by: java.lang.IllegalArgumentException: Unable to create converter for class com.tenor.android.core.d.a.c
                                                       for method d.a
                                                       at h.n$a.a(ServiceMethod.java:752)
                                                       at h.n$a.c(ServiceMethod.java:738)
                                                       at h.n$a.a(ServiceMethod.java:169)
                                                       at h.m.a(Retrofit.java:170)
                                                       at h.m.invoke(Retrofit.java:147)
                                                       at java.lang.reflect.Proxy.invoke(Proxy.java:393)
                                                       at $Proxy0.a(Unknown Source)
                                                       at com.i.b.a(GiffRetrievalService.java:38)
                                                       at com.ui.activities.GifListActivity.a(GifListActivity.java:93)
                                                       at com.ui.activities.GifListActivity.a(GifListActivity.java:63)
                                                       at com.ui.activities.GifListActivity.onCreate(GifListActivity.java:58)
                                                       at android.app.Activity.performCreate(Activity.java:6272)
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387)
                                                        ... 9 more
                                                    Caused by: java.lang.IllegalArgumentException: class com.tenor.android.core.b.a.b declares multiple JSON fields named a
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:170)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:100)
                                                       at com.google.gson.f.a(Gson.java:423)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:115)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:164)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:100)
                                                       at com.google.gson.f.a(Gson.java:423)
                                                       at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(CollectionTypeAdapterFactory.java:53)
                                                       at com.google.gson.f.a(Gson.java:423)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:115)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:164)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:100)
                                                       at com.google.gson.f.a(Gson.java:423)
                                                       at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(CollectionTypeAdapterFactory.java:53)
                                                       at com.google.gson.f.a(Gson.java:423)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:115)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:164)
                                                       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(ReflectiveTypeAdapterFactory.java:100)
                                                       at com.google.gson.f.a(Gson.java:423)
                                                       at h.a.a.a.a(GsonConverterFactory.java:64)
                                                       at h.m.a(Retrofit.java:330)
                                                       at h.m.b(Retrofit.java:313)
                                                       at h.n$a.c(ServiceMethod.java:736)
                                                        ... 21 more

谢谢

使用此规则

 -keep class com.tenor.android.core.** { *; }

这将避免 com.tenor.android.core 包中的所有类被混淆