create-react-native-app: Error staring Android emulator
Please make our job easier by filling this template out to completion. If you’re requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.
Description
yarn run android failed with below error message:
Error running adb: Error running app. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=exp://192.168.1.10:19000 flg=0x10000000 }
(node:572) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property ‘length’ of null
Expected Behavior
What action did you perform?
- Create a sample project using create-react-native-app command
- open the android emulator (tried with Android Studio and Genymotion, both failed)
- run yarn run android in the project folder
and what did you expect to happen?
I expect the the project can be loaded by simulator.
Observed Behavior
What actually happened when you performed the above actions?
I got below errors messages:
If there’s an error message, please paste the full terminal output and error message in this code block:
To view your app with live reloading, point the Expo app to this QR code.
You'll find the QR scanner on the Projects tab of the app, under the '+' menu.
Or enter this address in the Expo app's search bar:
exp://192.168.1.10:19000
Your phone will need to be on the same local network as this computer.
For links to install the Expo app, please visit https://expo.io.
Logs from serving your app will appear here. Press Ctrl+C at any time to stop.
Error running adb: Error running app. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=exp://192.168.1.10:19000 flg=0x10000000 }
(node:572) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'length' of null
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts:
rn_android@0.1.0 C:\Users\x\trunk\rn_android
-- react-native-scripts@0.0.22
-
npm ls react-native: rn_android@0.1.0 C:\Users\x\trunk\rn_android-- react-native@0.42.3 -
npm ls expo:
rn_android@0.1.0 C:\Users\x\trunk\rn_android
-- expo@15.1.2
node -v:v6.9.4npm -v:4.1.1yarn -v:yarn install v0.21.3
Also specify:
- Operating system: Windows Home
- Phone/emulator/simulator & version: Android Studio 2.2.3
Reproducible Demo
If you’re able, please provide a minimized reproducible demonstration of the problem you’re reporting.
Issues that come with minimal repro’s are resolved much more quickly than issues where a maintainer has to reproduce themselves.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (2 by maintainers)
Hi @brentvatne, as I already answer you in expo.io forums; after I delete ~/.expo/android-apk-cache folder and re-run “yarn run android” command, expo installed to Android Emulator.
Thank You!
@0lide - you can find the latest versions here: https://expo.io/--/api/v2/versions
androidUrlandiosUrl@xingjianpan you can get the apk from here: https://d1ahtucjixef4r.cloudfront.net/Exponent-1.14.0.apk and then install it manually.
@jesseruder Issue solved after installing the apk. Many thanks!
thanks @0lide ! your suggestion worked for me