react-native run-android永远执行

时间:2019-05-15 13:47:28

标签: android react-native gradle android-gradle gradlew

运行后

$result1 = mysqli_fetch_assoc($result1);

一切正常。然后我什么都没改变。然后我再次运行命令,并在终端中获得以下输出

react-native run-android

因此执行需要永远的时间。停在97%

我尝试过

info Starting JS server...
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...
Exception in thread "Device List Monitor" java.lang.NullPointerException
        at com.android.ddmlib.EmulatorConsole.checkConnection(EmulatorConsole.java:319)
        at com.android.ddmlib.EmulatorConsole.getConsole(EmulatorConsole.java:233)
        at com.android.ddmlib.DeviceMonitor.queryAvdName(DeviceMonitor.java:246)
        at com.android.ddmlib.DeviceMonitor.updateDevices(DeviceMonitor.java:218)
        at com.android.ddmlib.DeviceMonitor.access$400(DeviceMonitor.java:56)
        at com.android.ddmlib.DeviceMonitor$DeviceListUpdateListener.deviceListUpdate(DeviceMonitor.java:658)
        at com.android.ddmlib.DeviceMonitor$DeviceListMonitorTask.processIncomingDeviceData(DeviceMonitor.java:843)
        at com.android.ddmlib.DeviceMonitor$DeviceListMonitorTask.run(DeviceMonitor.java:777)
        at java.lang.Thread.run(Thread.java:748)
<============-> 97% EXECUTING [6s]
> IDLE
> :app:installDebug
> IDLE

来自 https://github.com/facebook/react-native/issues/18919

adb kill-server
adb start-server

来自https://github.com/facebook/react-native/issues/8868

这是怎么了? 一切正常。因此,安装应该可以。我什么都没改变。然后它没有用。 为了验证我创建了一个新项目,

chmod 755 android/gradlew

并尝试

react-native init NewProject

,但它也不适用于新项目。 但是几分钟前它起作用了。

我在哪里弄糟了? 我正在使用Ubuntu

npm --version 6.9.0 节点-版本 v12.2.0

0 个答案:

没有答案