react-native run-android DeviceException Could not

2019-03-23 11:30发布

I have created a React-Native Project,When I run react-native run-ios,I get the build successed.But when I run react-native run-android I get this error:

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: Could not create ADB Bridge. ADB location: /Applications/ADT/sdk/platform-tools/adb

Thanks in Advance.

5条回答
三岁会撩人
2楼-- · 2019-03-23 11:44

If you are using your device over usb for development then it is an error of your adb path.. set the path to D:\Android\sdk\platform-tools... in pc properties->advanced settings->environment variables->system variables..it worked for me.

查看更多
Bombasti
3楼-- · 2019-03-23 11:58

I have solve it, The error is because Genymotion use its own SDK not custom SDK location.I solved this question with the URL follow:

React-Native, Android, Genymotion: ADB server didn't ACK

thanks for Simon!

查看更多
看我几分像从前
4楼-- · 2019-03-23 12:02

If you have issue while building your project using react-native run-android and build failed with an exception of not creating adb bridge.

solution:

Go to your project path or any path in command prompt and type : adb kill-server after it again build your project using react-native run-android

查看更多
Evening l夕情丶
5楼-- · 2019-03-23 12:04

Press CTRL+SHIFT+ESC to open the Task Manager and delete the ADB.EXE process

查看更多
仙女界的扛把子
6楼-- · 2019-03-23 12:08

1.Go to android sdk path => c:\User\AppData\Local\Android\Sdk\platform-tools 2.Enter adb kill-sever && adb start-server

查看更多
登录 后发表回答