React-Native笔记--Failed to connect to development server using "adb reverse"

在真机上测试React-Native项目时,会碰到这种异常:

Failed to connect to development server using "adb reverse": Command failed: adb -s NR5H75FAGMIRLZSO reverse tcp:8081 tcp:8081

 意思是你当前手机的端口和需要的端口号不一致,就会出现那个异常,那就得想办法弄成一致的,目前解决是需要刷机,然后执行如下命令:

adb kill-server
adb start-server
adb reverse tcp:8081 tcp:8081

如果没有权限,则会报如下异常:

adb.exe: error: closed

 

你可能感兴趣的:(前端学习)