Android的ReactNative构建只是冻结了最后一步 [英] ReactNative build for android just freezes over the last step
问题描述
我一直在开发React Native项目;当我在执行 react-native运行android
或等效地 cd android& ./gradlew installDebug
。
捕获此异常只是最后一步:`
I was developing a React Native project as always; when I encountered the following error after doing react-native run android
or equivalently cd android && ./gradlew installDebug
.
It's just over the last step that this exception is caught:`
:app:assembleDebug
:app:installDebug
Exception in thread "Device List Monitor" java.lang.NullPointerException
at com.android.ddmlib.EmulatorConsole.checkConnection(EmulatorConsole.java:317)
at com.android.ddmlib.EmulatorConsole.getConsole(EmulatorConsole.java:231)
at com.android.ddmlib.DeviceMonitor.queryAvdName(DeviceMonitor.java:248)
at com.android.ddmlib.DeviceMonitor.updateDevices(DeviceMonitor.java:220)
at com.android.ddmlib.DeviceMonitor.access$400(DeviceMonitor.java:65)
at com.android.ddmlib.DeviceMonitor$DeviceListUpdateListener.deviceListUpdate(DeviceMonitor.java:662)
at com.android.ddmlib.DeviceMonitor$DeviceListMonitorTask.processIncomingDeviceData(DeviceMonitor.java:847)
at com.android.ddmlib.DeviceMonitor$DeviceListMonitorTask.run(DeviceMonitor.java:781)
at java.lang.Thread.run(Thread.java:745)
> Building 97% > :app:installDebug`
我正在对React-native 0.43.2和react-native进行编码-cli 2.0.1,也是npm 4.1.2和纱线0.21.3; Ubuntu 16.04。因此,最新版本为一切准备就绪,但我仍然无法找出问题所在。即使对于我刚刚通过 react-native init
创建的项目,也是如此。 :(
PS请确保我的仿真器已启动并正在运行,并且问题并非由它引起。
I'm coding on react-native version 0.43.2 and react-native-cli 2.0.1, also npm 4.1.2 and yarn 0.21.3; Ubuntu 16.04. So everything is armed to teeth by the latest version but I still can't figure out the problem. It happens even for a project I just create by react-native init
, it's every where. :(
P.S. be sure my emulator is up and running and the problem isn't due to it.
推荐答案
尝试重新启动adb以使其探查本地5554端口
Try restarting adb in to make it probe the local 5554 port
killall adb; adb devices
这篇关于Android的ReactNative构建只是冻结了最后一步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!