无法使用仿真器,使用react-native和expo

时间:2018-03-09 08:02:33

标签: android react-native expo

我正在使用本地反应世界,操作系统:基本操作系统,模拟器:Android Studio模拟器。

尝试在模拟器中打开应用时出现以下错误

12:58:16: Starting Android...
Error running adb: Error running app. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=exp://192.168.0.101:19000 flg=0x10000000 }


 › Press a to open Android device or emulator, or i to open iOS emulator.
 › Press q to display QR code.
 › Press r to restart packager, or R to restart packager and clear cache.
 › Press d to toggle development mode. (current mode: development)

(node:15266) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of null
    at /xdl/src/Android.js:90:18
    at Generator.next (<anonymous>)
    at step (/home/afzal/AFZAL/Cloud_Drive/Development/React Native/react-native-boilerplate-redux-flow-master/node_modules/xdl/build/Android.js:475:191)
    at /home/afzal/AFZAL/Cloud_Drive/Development/React Native/react-native-boilerplate-redux-flow-master/node_modules/xdl/build/Android.js:475:361
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
(node:15266) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

1 个答案:

答案 0 :(得分:0)

下载世博会XDE并从XDE创建项目

https://github.com/expo/xde/releases

通过您的电脑和手机中的相同wifi连接运行应用程序,或者您可以使用数据线连接

for Emulator首先启动模拟器然后运行应用程序 你可以使用genymotion for Emulator