0

用的是android studio 带的AVD manager模拟。
昨天运行正常,今天跑的时候报错。

Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: Could not create ADB Bridge.

(1)测试端口
adb devices显示

List of devices attached
* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon   

(2)测试搭建环境
react-native init HelloworldProject
cd HelloworldProject
react-native run-android报错

Execution failed for task ':app:installDebug'.
    > com.android.builder.testing.api.DeviceException: Could not create ADB Bridge.    

1个回答

0

尝试adb nodaemon server报错

error: cannot open transport registration socketpair: Invalid argument

关闭win10 防火墙
再次尝试adb start-server成功

* daemon not running; starting now at tcp:5037
* daemon started successfully

再次运行react-native run-android成功

撰写答案