JPush_flutter混淆打包错误

qiandukeji
2019-08-13 03:10 587 0

flutter集成JPush,使用混淆打包出现错误。(集成JPush之前已集成了JMessage,混淆打包成功。)

  • 混淆配置:
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.**  { *; }
-keep class io.flutter.util.**  { *; }
-keep class io.flutter.view.**  { *; }
-keep class io.flutter.**  { *; }
-keep class io.flutter.plugins.**  { *; }

# 极光
-dontoptimize
-dontpreverify
-keepattributes  EnclosingMethod,Signature
-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }
-keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }

-dontwarn cn.jiguang.**
-keep class cn.jiguang.** { *; }

-dontwarn cn.jmessage.**
-keep class cn.jmessage.**{ *; }

-keepclassmembers class ** {
    public void onEvent*(**);
}

#========================gson================================
-dontwarn com.google.**
-keep class com.google.gson.** {*;}

#========================protobuf================================
-keep class com.google.protobuf.** {*;}

# ohter
-dontwarn com.sangcomz.fishbun.adapter.image.impl.PicassoAdapter
-keep class com.sangcomz.fishbun.adapter.image.impl.PicassoAdapter
  • 错误日志:
* What went wrong:
Execution failed for task '<img class="emoji" src="https://community.jiguang.cn/images/emoji/twitter/jpush_flutter.png" />verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  E:\WorkSpace\wunian_app\build\jpush_flutter\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  E:\WorkSpace\wunian_app\build\jpush_flutter\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  E:\WorkSpace\wunian_app\build\jpush_flutter\intermediates\res\merged\release\values\values.xml:2615: error: resource android:attr/fontVariationSettings not found.
  E:\WorkSpace\wunian_app\build\jpush_flutter\intermediates\res\merged\release\values\values.xml:2616: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

1个回答

热门排序