mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix debugging on android for 0.63 (#29204)
Summary:
Currently on react native 0.63-rc.0 and 0.63-rc.1 enabling debugging throws an exception. It looks like something may have been missed in unregistering JSDevSupport in this commit c20963e

This should fix https://github.com/facebook/react-native/issues/28746 and https://github.com/facebook/react-native/issues/29136
## Changelog
[Android] [Fixed] - Fix crash when enabling debug
Pull Request resolved: https://github.com/facebook/react-native/pull/29204
Test Plan:
To recreate the bug:
npx react-native init RN063 --version 0.63.0-rc.1
react-native start
react-native run-android
Enable debug mode from react native dev menu
After this commit, the crash no longer occurs

Reviewed By: TheSavior
Differential Revision: D22395406
Pulled By: RSNara
fbshipit-source-id: 046df77ae1c1de96870fb46f409d59e7d6a68c0d
This commit is contained in:
@@ -10,7 +10,6 @@ package com.facebook.react;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.devsupport.JSCHeapCapture;
|
||||
import com.facebook.react.devsupport.JSDevSupport;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.module.annotations.ReactModuleList;
|
||||
import com.facebook.react.module.model.ReactModuleInfo;
|
||||
@@ -50,10 +49,7 @@ public class DebugCorePackage extends TurboReactPackage {
|
||||
return (ReactModuleInfoProvider) reactModuleInfoProviderClass.newInstance();
|
||||
} catch (ClassNotFoundException e) {
|
||||
// In OSS case, the annotation processor does not run. We fall back on creating this by hand
|
||||
Class<? extends NativeModule>[] moduleList =
|
||||
new Class[] {
|
||||
JSCHeapCapture.class, JSDevSupport.class,
|
||||
};
|
||||
Class<? extends NativeModule>[] moduleList = new Class[] {JSCHeapCapture.class};
|
||||
|
||||
final Map<String, ReactModuleInfo> reactModuleInfoMap = new HashMap<>();
|
||||
for (Class<? extends NativeModule> moduleClass : moduleList) {
|
||||
|
||||
Reference in New Issue
Block a user