当我在发布版本上使用proguard时,我遇到致命的异常.
引起:java.lang.NoSuchFieldError:no“Lcom / facebook / jni / HybridData;”类“Lcom / facebook / react / cxxbridge / CatalystInstanceImpl;”中的字段“mHybridData”或者它的超类
这是堆栈跟踪:
03-17 07:06:58.852 1057 1432 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.myApp.staging/com.myApp.MainActivity (has extras)} from uid 10008 on display 0 03-17 07:06:58.867 1057 1451 I ActivityManager: Start proc 2234:com.myApp.staging/u0a62 for activity com.myApp.staging/com.myApp.MainActivity 03-17 07:06:58.892 2234 2234 D FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization. 03-17 07:06:58.894 2234 2234 W InstanceID/Rpc: Failed to resolve REGISTER intent,falling back 03-17 07:06:58.895 2234 2234 W InstanceID/Rpc: Both Google Play Services and legacy GSF package are missing 03-17 07:06:58.896 2234 2234 W GooglePlayServicesUtil: Google Play Store is missing. 03-17 07:06:58.896 2234 2234 I DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0 03-17 07:06:58.896 2234 2234 I DynamiteModule: Selected local version of com.google.android.gms.flags 03-17 07:06:58.897 2234 2234 W DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found. 03-17 07:06:58.897 2234 2234 W GooglePlayServicesUtil: Google Play Store is missing. 03-17 07:06:58.897 2234 2234 I DynamiteModule: Considering local module com.google.android.gms.crash:0 and remote module com.google.android.gms.crash:0 03-17 07:06:58.897 2234 2234 E FirebaseCrash: Failed to initialize crash reporting: com.google.android.gms.d.bk$a: No acceptable module found. Local version is 0 and remote version is 0. 03-17 07:06:58.897 2234 2234 D FirebaseCrash: Cannot register Firebase Analytics listener since Firebase Crash Reporting is not enabled 03-17 07:06:58.902 2234 2234 I FA : App measurement is starting up,version: 9877 03-17 07:06:58.902 2234 2234 I FA : To enable debug logging run: adb shell setprop log.tag.FA VERBOSE 03-17 07:06:58.905 2234 2234 I FA : To enable faster debug mode event logging run: 03-17 07:06:58.905 2234 2234 I FA : adb shell setprop firebase.analytics.debug-mode com.myApp.staging 03-17 07:06:58.908 2234 2234 I FirebaseInitProvider: FirebaseApp initialization successful 03-17 07:06:58.920 2234 2234 V fb-UnpackingSoSource: locked dso store /data/user/0/com.myApp.staging/lib-main 03-17 07:06:58.921 2234 2234 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.myApp.staging/lib-main 03-17 07:06:58.921 2234 2234 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.myApp.staging/lib-main 03-17 07:06:58.941 2234 2234 D ReactNative: [CodePush] Loading JS bundle from "assets://index.android.bundle" 03-17 07:06:58.957 2234 2234 I art : Thread[1,tid=2234,Native,Thread*=0xf3e34a00,peer=0x73a04258,"main"] recursive attempt to load library "/data/app/com.myApp.staging-1/lib/x86/libfb.so" 03-17 07:06:58.967 2234 2262 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 03-17 07:06:58.977 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupViewManager 03-17 07:06:58.982 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.a 03-17 07:06:58.987 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeViewManager 03-17 07:06:58.987 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.b 03-17 07:06:58.993 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextViewManager 03-17 07:06:58.996 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.e 03-17 07:06:58.998 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager 03-17 07:06:59.000 2234 2234 D : HostConnection::get() New Host Connection established 0xed716b90,tid 2234 03-17 07:06:59.000 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.d 03-17 07:06:59.003 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager 03-17 07:06:59.004 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.g 03-17 07:06:59.004 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager 03-17 07:06:59.005 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager 03-17 07:06:59.005 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager 03-17 07:06:59.006 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager 03-17 07:06:59.007 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager 03-17 07:06:59.009 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.b 03-17 07:06:59.009 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager 03-17 07:06:59.010 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.b 03-17 07:06:59.010 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager 03-17 07:06:59.012 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.g 03-17 07:06:59.013 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager 03-17 07:06:59.013 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager 03-17 07:06:59.014 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager$a 03-17 07:06:59.014 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager 03-17 07:06:59.016 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$a 03-17 07:06:59.016 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager 03-17 07:06:59.017 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.a 03-17 07:06:59.018 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager 03-17 07:06:59.020 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.j 03-17 07:06:59.022 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager 03-17 07:06:59.023 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager 03-17 07:06:59.024 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.view.ReactViewManager 03-17 07:06:59.026 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager 03-17 07:06:59.026 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager 03-17 07:06:59.026 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager 03-17 07:06:59.027 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager 03-17 07:06:59.031 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.reactnative.photoview.PhotoViewManager 03-17 07:06:59.032 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.react.rnspinkit.RNSpinkit 03-17 07:06:59.033 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.reactnative.androidsdk.FBLikeViewManager 03-17 07:06:59.035 1452 1571 E Surface : getSlotFromBufferLocked: unknown buffer: 0xe8e02d90 03-17 07:06:59.036 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.reactnative.androidsdk.FBLoginButtonManager 03-17 07:06:59.036 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.reactnative.androidsdk.FBSendButtonManager 03-17 07:06:59.037 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.reactnative.androidsdk.FBShareButtonManager 03-17 07:06:59.037 2234 2261 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.oney.WebRTCModule.RTCVideoViewManager 03-17 07:06:59.053 2234 2262 D libEGL : loaded /system/lib/egl/libEGL_emulation.so 03-17 07:06:59.054 2234 2262 D libEGL : loaded /system/lib/egl/libGLESv1_CM_emulation.so 03-17 07:06:59.054 2234 2261 D JVM : JVM::Initialize@[tid=2261] 03-17 07:06:59.054 2234 2261 D JVM : JVM::JVM@[tid=2261] 03-17 07:06:59.061 2234 2261 W AudioCapabilities: Unsupported mime audio/x-ms-wma 03-17 07:06:59.062 2234 2261 W AudioCapabilities: Unsupported mime audio/vnd.rn-realaudio 03-17 07:06:59.064 2234 2262 D libEGL : loaded /system/lib/egl/libGLESv2_emulation.so 03-17 07:06:59.064 2234 2261 W AudioCapabilities: Unsupported mime audio/mpeg-L2 03-17 07:06:59.064 2234 2261 W AudioCapabilities: Unsupported mime audio/ac3 03-17 07:06:59.065 2234 2261 W AudioCapabilities: Unsupported mime audio/x-ape 03-17 07:06:59.066 2234 2261 W AudioCapabilities: Unsupported mime audio/vnd.dts 03-17 07:06:59.067 2234 2261 W AudioCapabilities: Unsupported mime audio/x-pcm 03-17 07:06:59.067 2234 2261 W AudioCapabilities: Unsupported mime audio/ffmpeg 03-17 07:06:59.068 2234 2262 D : HostConnection::get() New Host Connection established 0xeebd2920,tid 2262 03-17 07:06:59.069 2234 2261 W VideoCapabilities: Unsupported mime video/x-ms-wmv 03-17 07:06:59.070 2234 2261 W VideoCapabilities: Unsupported mime video/vnd.rn-realvideo 03-17 07:06:59.071 2234 2261 W VideoCapabilities: Unsupported mime video/vc1 03-17 07:06:59.071 2234 2261 W VideoCapabilities: Unsupported mime video/x-flv 03-17 07:06:59.072 2234 2261 W VideoCapabilities: Unsupported mime video/divx 03-17 07:06:59.072 2234 2261 W VideoCapabilities: Unsupported mime video/ffmpeg 03-17 07:06:59.076 2234 2262 I OpenGLRenderer: Initialized EGL,version 1.4 03-17 07:06:59.082 2234 2261 I VideoCapabilities: Unsupported profile 4 for video/mp4v-es 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: Trying to find HW decoder for mime video/x-vnd.on2.vp8 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: Found candidate decoder OMX.google.vp8.decoder 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: No HW decoder found for mime video/x-vnd.on2.vp8 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: Trying to find HW decoder for mime video/x-vnd.on2.vp9 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: Found candidate decoder OMX.google.vp9.decoder 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: No HW decoder found for mime video/x-vnd.on2.vp9 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: Trying to find HW decoder for mime video/avc 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: Found candidate decoder OMX.ffmpeg.h264.decoder 03-17 07:06:59.083 2234 2261 I org.webrtc.Logging: MediaCodecVideoDecoder: No HW decoder found for mime video/avc 03-17 07:06:59.085 2234 2266 D JVM : AttachCurrentThreadIfNeeded::ctor@[tid=2266] 03-17 07:06:59.085 2234 2266 D JVM : Attaching thread to JVM 03-17 07:06:59.086 2234 2266 D JVM : JVM::environment@[tid=2266] 03-17 07:06:59.086 2234 2266 D JVM : JNIEnvironment::ctor@[tid=2266] 03-17 07:06:59.086 2234 2266 D AudioManager: ctor@[tid=2266] 03-17 07:06:59.086 2234 2266 D JVM : JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioManager) 03-17 07:06:59.086 2234 2266 D JVM : NativeRegistration::ctor@[tid=2266] 03-17 07:06:59.086 2234 2266 D JVM : NativeRegistration::NewObject@[tid=2266] 03-17 07:06:59.086 2234 2266 I org.webrtc.Logging: WebRtcAudioManager: ctor@[name=Thread-167,id=167] 03-17 07:06:59.087 2234 2266 I org.webrtc.Logging: WebRtcAudioManager: Sample rate is set to 44100 Hz 03-17 07:06:59.091 2234 2266 I org.webrtc.Logging: WebRtcAudioEffects: canUseAcousticEchoCanceler: false 03-17 07:06:59.091 2234 2266 I org.webrtc.Logging: WebRtcAudioEffects: canUseAutomaticGainControl: false 03-17 07:06:59.091 2234 2266 I org.webrtc.Logging: WebRtcAudioEffects: canUseNoiseSuppressor: false 03-17 07:06:59.093 2234 2266 D AudioManager: OnCacheAudioParameters@[tid=2266] 03-17 07:06:59.093 2234 2266 D AudioManager: hardware_aec: 0 03-17 07:06:59.093 2234 2266 D AudioManager: hardware_agc: 0 03-17 07:06:59.093 2234 2266 D AudioManager: hardware_ns: 0 03-17 07:06:59.093 2234 2266 D AudioManager: low_latency_output: 0 03-17 07:06:59.093 2234 2266 D AudioManager: pro_audio: 0 03-17 07:06:59.093 2234 2266 D AudioManager: sample_rate: 44100 03-17 07:06:59.093 2234 2266 D AudioManager: channels: 1 03-17 07:06:59.093 2234 2266 D AudioManager: output_buffer_size: 3174 03-17 07:06:59.093 2234 2266 D AudioManager: input_buffer_size: 2048 03-17 07:06:59.093 2234 2266 D JVM : GlobalRef::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D AudioManager: JavaAudioManager::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D AudioManager: IsLowLatencyPlayoutSupported() 03-17 07:06:59.093 2234 2266 D JVM : AttachCurrentThreadIfNeeded::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : JVM::environment@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : JNIEnvironment::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D AudioTrackJni: ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioTrack) 03-17 07:06:59.093 2234 2266 D JVM : NativeRegistration::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : NativeRegistration::NewObject@[tid=2266] 03-17 07:06:59.093 2234 2266 I org.webrtc.Logging: WebRtcAudioTrack: ctor@[name=Thread-167,id=167] 03-17 07:06:59.093 2234 2266 D JVM : GlobalRef::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : AttachCurrentThreadIfNeeded::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : JVM::environment@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : JNIEnvironment::ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D AudioRecordJni: ctor@[tid=2266] 03-17 07:06:59.093 2234 2266 D JVM : JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioRecord) 03-17 07:06:59.093 2234 2266 D JVM : NativeRegistration::ctor@[tid=2266] 03-17 07:06:59.094 2234 2266 D JVM : NativeRegistration::NewObject@[tid=2266] 03-17 07:06:59.094 2234 2266 I org.webrtc.Logging: WebRtcAudioRecord: ctor@[name=Thread-167,id=167] 03-17 07:06:59.094 2234 2266 I org.webrtc.Logging: WebRtcAudioEffects: ctor@[name=Thread-167,id=167] 03-17 07:06:59.094 2234 2266 D JVM : GlobalRef::ctor@[tid=2266] 03-17 07:06:59.094 2234 2266 D AudioManager: SetActiveAudioLayer(5)@[tid=2266] 03-17 07:06:59.094 2234 2266 D AudioManager: delay_estimate_in_milliseconds: 150 03-17 07:06:59.094 2234 2266 D AudioTrackJni: AttachAudioBuffer@[tid=2266] 03-17 07:06:59.094 2234 2266 D AudioTrackJni: SetPlayoutSampleRate(44100) 03-17 07:06:59.094 2234 2266 D AudioTrackJni: SetPlayoutChannels(1) 03-17 07:06:59.094 2234 2266 D AudioRecordJni: AttachAudioBuffer 03-17 07:06:59.094 2234 2266 D AudioRecordJni: SetRecordingSampleRate(44100) 03-17 07:06:59.094 2234 2266 D AudioRecordJni: SetRecordingChannels(1) 03-17 07:06:59.094 2234 2266 D AudioRecordJni: total_delay_in_milliseconds: 150 03-17 07:06:59.094 2234 2266 D AudioManager: Init@[tid=2266] 03-17 07:06:59.094 2234 2266 I org.webrtc.Logging: WebRtcAudioManager: init@[name=Thread-167,id=167] 03-17 07:06:59.095 2234 2266 I org.webrtc.Logging: WebRtcAudioManager: audio mode is: MODE_NORMAL 03-17 07:06:59.096 2234 2266 D AudioTrackJni: Init@[tid=2266] 03-17 07:06:59.096 2234 2266 D AudioRecordJni: Init@[tid=2266] 03-17 07:06:59.102 2234 2265 I org.webrtc.Logging: PeerConnectionFactory: onNetworkThreadReady 03-17 07:06:59.103 2234 2266 I org.webrtc.Logging: PeerConnectionFactory: onWorkerThreadReady 03-17 07:06:59.105 2234 2267 I org.webrtc.Logging: PeerConnectionFactory: onSignalingThreadReady 03-17 07:06:59.106 2234 2261 D InCallManager: fallback to old school screen locker... 03-17 07:06:59.107 2234 2261 D InCallManager: InCallManager initialized 03-17 07:06:59.110 2234 2261 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #5 03-17 07:06:59.110 2234 2261 E AndroidRuntime: Process: com.myApp.staging,PID: 2234 03-17 07:06:59.110 2234 2261 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground() 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:309) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:223) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:242) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: Caused by: java.lang.NoSuchFieldError: no "Lcom/facebook/jni/HybridData;" field "mHybridData" in class "Lcom/facebook/react/cxxbridge/CatalystInstanceImpl;" or its superclasses 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.cxxbridge.CatalystInstanceImpl.initializeBridge(Native Method) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.cxxbridge.CatalystInstanceImpl.<init>(Unknown Source) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.cxxbridge.CatalystInstanceImpl.<init>(Unknown Source) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.cxxbridge.CatalystInstanceImpl$b.a(Unknown Source) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.j.a(Unknown Source) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.j.a(Unknown Source) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.j$a.a(Unknown Source) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at com.facebook.react.j$a.doInBackground(Unknown Source) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:295) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 03-17 07:06:59.110 2234 2261 E AndroidRuntime: ... 3 more 03-17 07:06:59.110 1057 1451 W ActivityManager: Force finishing activity com.myApp.staging/com.myApp.MainActivity 03-17 07:06:59.126 2234 2262 W EGL_emulation: eglSurfaceAttrib not implemented 03-17 07:06:59.126 2234 2262 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xeebd3e00,error=EGL_SUCCESS 03-17 07:06:59.129 1057 1451 D : HostConnection::get() New Host Connection established 0xe8d86a80,tid 1451 03-17 07:06:59.145 2234 2249 I FA : This instance being marked as an uploader 03-17 07:06:59.150 1080 1080 E EGL_emulation: tid 1080: eglCreateSyncKHR(1215): error 0x3004 (EGL_BAD_ATTRIBUTE) 03-17 07:06:59.191 98 98 D : Socket deconnection 03-17 07:06:59.235 1057 2223 I OpenGLRenderer: Initialized EGL,version 1.4 03-17 07:06:59.250 1057 2223 W EGL_emulation: eglSurfaceAttrib not implemented 03-17 07:06:59.250 1057 2223 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xdc561b20,error=EGL_SUCCESS 03-17 07:06:59.269 1452 1571 W EGL_emulation: eglSurfaceAttrib not implemented 03-17 07:06:59.269 1452 1571 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xdf71e5a0,error=EGL_SUCCESS 03-17 07:06:59.271 2234 2262 E Surface : getSlotFromBufferLocked: unknown buffer: 0xe8e024d0 03-17 07:06:59.299 1057 1474 W ActivityManager: Unable to start service Intent { act=com.google.android.gms.ads.identifier.service.START pkg=com.google.android.gms } U=0: not found 03-17 07:06:59.353 751 1132 W AudioFlinger: write blocked for 488 msecs,3 delayed writes,thread 0xf1e80000 03-17 07:06:59.377 1057 1483 I ActivityManager: Killing 1886:com.android.email/u0a34 (adj 15): empty #17 03-17 07:07:00.601 2234 2261 I Process : Sending signal. PID: 2234 SIG: 9 03-17 07:07:00.606 1057 1451 D GraphicsStats: Buffer count: 4 03-17 07:07:00.629 1057 1483 I ActivityManager: Process com.myApp.staging (pid 2234) has died 03-17 07:07:00.632 1057 2223 E Surface : getSlotFromBufferLocked: unknown buffer: 0xdf4db920 03-17 07:07:00.637 1057 2223 D OpenGLRenderer: endAllStagingAnimators on 0xdee4b280 (RippleDrawable) with handle 0xdc5609a0 03-17 07:07:00.639 1057 1432 W InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 2234 uid 10062 03-17 07:07:00.818 1057 1076 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0 03-17 07:07:01.194 98 98 D : Socket deconnection
> React Native版本:0.42.0
Proguard文件是:
# Add project specific ProGuard rules here. # By default,the flags in this file are appended to flags specified # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details,see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS,uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Disabling obfuscation is useful if you collect stack traces from production crashes # (unless you are using a system that supports de-obfuscate the stack traces). #-dontobfuscate # React Native # Keep our interfaces so they can be used by other ProGuard rules. # See http://sourceforge.net/p/proguard/bugs/466/ -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip # Do not strip any method/class that is annotated with @DoNotStrip -keep @com.facebook.proguard.annotations.DoNotStrip class * -keep @com.facebook.common.internal.DoNotStrip class * -keepclassmembers class * { @com.facebook.proguard.annotations.DoNotStrip *; @com.facebook.common.internal.DoNotStrip *; } -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { void set*(***); *** get*(); } -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } -keep class * extends com.facebook.react.bridge.NativeModule { *; } -keepclassmembers,includedescriptorclasses class * { native <methods>; } -keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; } -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; } -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; } -dontwarn com.facebook.react.** # okhttp -keepattributes Signature -keepattributes *Annotation* -keep class okhttp3.** { *; } -keep interface okhttp3.** { *; } -dontwarn okhttp3.** # okio -keep class sun.misc.Unsafe { *; } -dontwarn java.nio.file.* -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement -dontwarn okio.** # fixed on 0.43.0 https://github.com/facebook/react-native/pull/12511 -dontwarn com.facebook.fbui.textlayoutbuilder.proxy.StaticLayoutProxy # The rxjava library depends on sun.misc.Unsafe,which is unavailable on Android # The rxjava team is aware of this,and mention in the docs that they only use # the unsafe functionality if the platform supports it. # - https://github.com/ReactiveX/RxJava/issues/1415#issuecomment-48390883 # - https://github.com/ReactiveX/RxJava/blob/1.x/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java#L23 -dontwarn rx.internal.util.** # Webrtc -keep class org.webrtc.** { *; }
我有一个相关的错误,但与React Native 0.47.1略有不同:
原文链接:https://www.f2er.com/react/300785.htmljava.lang.NoSuchFieldError: no "Lcom/facebook/jni/HybridData;" field "mHybridData" in class "Lcom/facebook/react/bridge/JavaScriptExecutor;" or its superclasses at com.facebook.react.bridge.CatalystInstanceImpl.initializeBridge(Native Method) at com.facebook.react.bridge.CatalystInstanceImpl.<init>(SourceFile:114) at com.facebook.react.bridge.CatalystInstanceImpl.<init>(SourceFile:42) at bnv.a(SourceFile:574) at bmg.a(SourceFile:999) at bmg.a(SourceFile:109) at bmg$4.run(SourceFile:802) at java.lang.Thread.run(Thread.java:761)
-keep class com.facebook.react.bridge.CatalystInstanceImpl { *; } -keep class com.facebook.react.bridge.JavaScriptExecutor { *; } -keep class com.facebook.react.bridge.queue.NativeRunnable { *; } -keep class com.facebook.react.bridge.ReadableType { *; }
这似乎是造成这种情况的根本原因,当您将React Native集成到现有的Android项目中时,Proguard规则可能不包括默认的React Native Proguard文件所具有的-dontobfuscate.我将更新这个GitHub issue,所以希望将一个修复程序放入RN的未来版本中.