反应堆本地模块HMRClinet不是一个已注册的可调用模块(调用enable)

时间:2022-09-04 09:57:58

I have set my IP and make sure it's right

我设置了我的IP,确保它是正确的

but,when I react-native run-android

但是,当我react-native运行android

反应堆本地模块HMRClinet不是一个已注册的可调用模块(调用enable)

5 个解决方案

#1


8  

i had the same problem , didn't knew what to do.

我有同样的问题,不知道该怎么做。

cd android
./gradlew clean

after that

在那之后

react-native run-android 

solved my problem

解决了我的问题

#2


3  

I resolved issue by:

我解决的问题:

1: Uninstalling app

1:卸载应用程序

2: Restart package: react-native run-android

2:重启包:堆本地运行android

#3


0  

you need to stop npm server. then hit following command in terminal.

您需要停止npm服务器。然后在终端点击以下命令。

adb kill-server
adb start-server

than start npm server

比启动npm服务器

#4


0  

Santosh's answer is correct, but I couldn't use it, so for others who run into this problem and are as much of a newbie as I am at the moment... The adb that Santosh is restarting here is the Android Debugging Bridge. It seems to be at the heart of the Hot Reloading / remote debugging that's built into React Native. Basically, it got confused and needed resetting.

Santosh的答案是正确的,但是我不能使用它,所以对于那些遇到这个问题的人来说,他们就像我现在一样是个新手……Santosh在这里重新启动的adb是Android调试桥。它似乎是内置在React Native中的热重载/远程调试的核心。基本上,它搞混了,需要重新设置。

Alternate Solution Trying to run adb failed for me, so I stopped the emulator, opened the Android Virtual Device manager (in Android Studio until Tools -> Android -> AVD Manager, and on the line for the particular phone I was emulating, I clicked the down arrow next to the edit (pencil) icon to the right and selected 'Wipe Data'. Then I restarted that device (the Play button just to the left of the edit (pencil) icon. Restarted my app via react-native run-ios and everything was fine.

替代解决方案试图运行亚行失败对我来说,所以我停止了模拟器,打开了Android虚拟设备管理器(在Android Studio工具- > Android - > AVD管理器之前,特别是在直线上的电话我是效仿,我点击edit(铅笔)旁边的向下箭头图标,选择“清除数据”。然后我重启那个设备(在编辑(铅笔)图标左边的播放按钮。通过本地运行重新启动我的应用程序,一切正常。

More on Santosh's Solution To do it Santosh's way, you need the Android SDK bin folder in your path, or to run the command with full path. It's in your Android SDK folder under platform-tools. Don't forget to re-enable Hot Reloading after restarting (if you're using it).

在Santosh的解决方案中,更多的是Santosh的方法,您需要在您的路径中使用Android SDK bin文件夹,或者使用完整的路径运行该命令。它在平台工具下的Android SDK文件夹中。不要忘记重新启动后重新启用热重载(如果您正在使用它)。

#5


0  

same error occurs to me when I switch off JS DEV Mode and enable Hot Reloading.I solved it by disable Hot Reloading.Hope it could help.

当我关闭JS DEV模式并启用热重加载时,我也会发生同样的错误。我通过禁用热重载解决了这个问题。希望它可以帮助。

#1


8  

i had the same problem , didn't knew what to do.

我有同样的问题,不知道该怎么做。

cd android
./gradlew clean

after that

在那之后

react-native run-android 

solved my problem

解决了我的问题

#2


3  

I resolved issue by:

我解决的问题:

1: Uninstalling app

1:卸载应用程序

2: Restart package: react-native run-android

2:重启包:堆本地运行android

#3


0  

you need to stop npm server. then hit following command in terminal.

您需要停止npm服务器。然后在终端点击以下命令。

adb kill-server
adb start-server

than start npm server

比启动npm服务器

#4


0  

Santosh's answer is correct, but I couldn't use it, so for others who run into this problem and are as much of a newbie as I am at the moment... The adb that Santosh is restarting here is the Android Debugging Bridge. It seems to be at the heart of the Hot Reloading / remote debugging that's built into React Native. Basically, it got confused and needed resetting.

Santosh的答案是正确的,但是我不能使用它,所以对于那些遇到这个问题的人来说,他们就像我现在一样是个新手……Santosh在这里重新启动的adb是Android调试桥。它似乎是内置在React Native中的热重载/远程调试的核心。基本上,它搞混了,需要重新设置。

Alternate Solution Trying to run adb failed for me, so I stopped the emulator, opened the Android Virtual Device manager (in Android Studio until Tools -> Android -> AVD Manager, and on the line for the particular phone I was emulating, I clicked the down arrow next to the edit (pencil) icon to the right and selected 'Wipe Data'. Then I restarted that device (the Play button just to the left of the edit (pencil) icon. Restarted my app via react-native run-ios and everything was fine.

替代解决方案试图运行亚行失败对我来说,所以我停止了模拟器,打开了Android虚拟设备管理器(在Android Studio工具- > Android - > AVD管理器之前,特别是在直线上的电话我是效仿,我点击edit(铅笔)旁边的向下箭头图标,选择“清除数据”。然后我重启那个设备(在编辑(铅笔)图标左边的播放按钮。通过本地运行重新启动我的应用程序,一切正常。

More on Santosh's Solution To do it Santosh's way, you need the Android SDK bin folder in your path, or to run the command with full path. It's in your Android SDK folder under platform-tools. Don't forget to re-enable Hot Reloading after restarting (if you're using it).

在Santosh的解决方案中,更多的是Santosh的方法,您需要在您的路径中使用Android SDK bin文件夹,或者使用完整的路径运行该命令。它在平台工具下的Android SDK文件夹中。不要忘记重新启动后重新启用热重载(如果您正在使用它)。

#5


0  

same error occurs to me when I switch off JS DEV Mode and enable Hot Reloading.I solved it by disable Hot Reloading.Hope it could help.

当我关闭JS DEV模式并启用热重加载时,我也会发生同样的错误。我通过禁用热重载解决了这个问题。希望它可以帮助。