美文网首页
[RN坑]com.android.ddmlib.InstallE

[RN坑]com.android.ddmlib.InstallE

作者: zhangyugehu | 来源:发表于2017-03-29 18:00 被阅读547次

问题

环境

windows + 小米3

问题

react-native run-android运行react-native helloworld的时候,跑到:app:installDebug后就报错了

Installing APK 'app-debug.apk' on 'MI 3W - 6.0.1' for app:debug
Unable to install D:\Documents\WebStorm\react-native\AwwsomeProject\android\app\build\outputs\apk\app-debug.apk
com.android.ddmlib.InstallException: Failed to establish session
at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:64)
at com.android.ddmlib.Device.installPackages(Device.java:904)
at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:137)
at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.java:134)
...
:app:installDebug FAILED

FAILURE: Build failed with an exception.

* 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: 6 mins 22.498 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

balabala一大堆

解决办法

[开发者选项]中 关闭 [弃用MIUI优化],白屏的话它自动提示我开启[悬浮窗权限],然后摇一摇reload一下就好了

参考文档

相关文章

  • [RN坑]com.android.ddmlib.InstallE

    问题 环境 windows + 小米3 问题 react-native run-android运行react-na...

  • iOS开发-与ReactNative交互时bridge is n

    上次说到了与RN交互时,RN引用原生UI组件时出现的坑,如果说上次的坑是因为没有仔细看官方文档导致的,这次的坑应该...

  • RN开发中遇到的坑 - Can't find variable:

    RN开发中遇到的坑 - Can't find variable: navigate 测试RN开发的组件,在使用na...

  • React Native踩坑日记(三)—— react-navi

    前提 本人入坑RN的时候, RN已经是0.46版本了. 按照RN中文网上的提示,今年年初(0.44版本)以后的RN...

  • RN入坑

    react native 参考自rn中文官网的官方教学,不过说实话个人觉得这个教学讲的不细,很多地方交代的不是很清...

  • RN的坑

    1. Activity里getMainComponentName的return返回值要和RN注册值"RnTestP...

  • RN 坑小计

    1 super expression must either be null or a function not ...

  • RN 踩坑

    现在很乱,只是自己作为笔记看的,空了会整理。 _this 字段的使用能不用尽量别用,尤其是在列表的 Item 中 ...

  • RN的坑

    坑一:安装React-Navigation报错 在react-native link react-native-g...

  • RN 各种坑

    Unable to resolve module @babel/runtime/helpers/objectSpr...

网友评论

      本文标题:[RN坑]com.android.ddmlib.InstallE

      本文链接:https://www.haomeiwen.com/subject/umkyottx.html