search

Home  >  Q&A  >  body text

react-native 启动Android项目失败

如图,我检查了Android环境变量,在cmd输入adb有成功提示。
输入adb devices可以看到我的设备(真机)。
还有什么原因可能导致失败?
PS:项目init已经完成,在start-android的时候失败。

黄舟黄舟2772 days ago466

reply all(1)I'll reply

  • 阿神

    阿神2017-04-17 17:38:33

    We often encounter strange problems when using React Native. This problem is that React Native does not recognize your phone, but your phone is indeed there. React Native经常会碰到奇葩的问题,这个问题是React Native没有识别到你的手机,但是你的手机确实在的。

    经常碰到这种情况,一般的做法就是不要用run-android来启动项目。使用Android Studio打开项目并运行到手机上。如果修改了js的话就双击R。注意要开启服务。

    React Native

    We often encounter this situation. The general approach is not to use run-android to start the project. Use Android Studio to open the project and run it on the phone. If you have modified js, double-click R. Make sure to enable the service. 🎜 🎜React Native It is better to give up. 🎜

    reply
    0
  • Cancelreply