无法使用模拟器,正在使用React Native和Expo

3

我正在使用带有Expo的React Native技术,操作系统为Elementary OS,模拟器为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
从 Expo 下载 XDE 并从 XDE 创建项目。

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

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

对于模拟器,请先启动模拟器,然后运行应用程序 您可以使用Genymotion进行模拟器操作


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接