'React native Android Project Not starting in emulator
i just created a react native project on windows, using expo. After Creating the project i ran npm start and then expo start the next logical thing to do is to press the a button which will launch, the project on the android virtual device, but instead it gave me this error Couldn't start project on Android: Error running adb: Error running app. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=exp://192.168.43.148:19000 flg=0x10000000 }
when i tried running it on my android phone with the expo android app it ran smoothly, i don't know what to do please help thanks
Solution 1:[1]
I had the same problem and I got it fixed as follows:
- Go to SDK Manager in
Android studio > SDK Toolsand check whether there is any update forAndroid SDK Build-Tools. If there is any, please make sure you update it. - Close any Android virtual device currently running and then go to Android Studio Virtual Device Manager and wipe the data of your Android virtual device.
- Make sure you have enough internal storage allocated for your Android virtual device to install apps.
- Check whether Android Debug Bridge utility is installed in your device. If not please install it. To install in mac, I used the below command (Assuming that you have HomeBrew installed in your mac device):
brew install android-platform-tools
- Start your Android virtual device ( This step should be done before running the expo development server)
- In the
Developer optionsmenu of your Android virtual device, make sureUSB debuggingoption is enabled. - Finally, try running the development server by
expo startand press on the button to run on your Android emulator.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Madhawa Jayagoda |
