如何将Rerink-native使用收缩器(R8)

时间:2019-08-06 20:15:00

标签: android react-native react-native-android react-native-fbsdk

我正在将本机版本更新为0.60.4,但是当我尝试构建发行版时,我陷入了Task:app:transformClassesAndResourcesWithR8ForRelease

我尝试禁用R8并可以正常工作,但apk却大了3倍

R8 is the new Android code shrinker. If you experience any issues, please file a bug at
https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can
disable R8 by updating gradle.properties with 'android.enableR8=false'.
Current version is: 1.4.94 (build 3904928f0db9c3bf128ce3bbfb160 from go/r8bot (luci-r8-ci-archive-0-5g74)).


D8: The rule `-keep class * extends com.facebook.react.bridge.JavaScriptModule {
  *;
}` uses extends but actually matches implements.
D8: The rule `-keep class * extends com.facebook.react.bridge.NativeModule {
  *;
}` uses extends but actually matches implements.
D8: The rule `-keep public class * extends androidx.versionedparcelable.VersionedParcelable {
  <init>();
}` uses extends but actually matches implements.

1 个答案:

答案 0 :(得分:2)