React-native 踩坑记录

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to establish session

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 24.974 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

最简单的解决方案就是 用 as 打开 项目下 android 目录使用 as 编译运行,失败的就看错误输出,该装啥装啥,装好了运行就可以了~

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 174,634评论 25 709
  • C:嗨,女士们,谢谢你们来接我。外面的天气很糟。 M:是这样的,已经持续下了好几个小时了。 C:Melissa,你...
    哈哈兴鸿阅读 377评论 0 0
  • 其实我不知道咋写我的母亲,因为我看过太多有关母亲的书和影视剧,我的母亲跟她们不一样,却又有点一样。 我是在怀着对母...
    蜀山袖手人阅读 574评论 7 9
  • 我有一个朋友小A, 前段时间刚到一个公司上班, 工作还不到半月就辞职了, 我问她为什么? 她说:工资太低了,还不够...
    鑫鑫豆米阅读 420评论 0 0