Error running adb: Error running app. Error: Activity not started, unable to resolve Intent

12

Hi I am trying to run 'yarn android' on my react-native project. And am running into the following error:

yarn android v0.27.5
$ react-native-scripts android
10:37:45 AM: Starting packager...
10:39:34 AM: Starting Android...
10:39:37 AM: Packager started!

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.

    <QR CODE>                                                  

Or enter this address in the Expo app's search bar:

  exp://172.19.29.31: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://172.19.29.31:19000 flg=0x10000000 }

(node:28009) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'length' of null

I used the create-react-native-app generator to setup my app and here is my project structure:

<username>$ls
App.js          app.json        gen         package.json
App.test.js     assets          my-app-key.keystore stylesheet.js
README.md       components      node_modules        yarn.lock 

I also tried scanning the qr code with my expo app to run my app on my phone but it goes to 100% and then crashes out of the app, or it gives the dark blue screen in which the error is "Uncaught Error" Packager is not running at http::19003" (even if the port I scan is http:19000).

I also just now tried running 'npm start' and then 'a' for the android option but am getting the message: 11:40:20 AM: Starting Android...

Error running adb: Error running app. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=exp://172.19.29.31: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:31496) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'length' of null
11:43:30 AM: Running app on SM-T560NU in development mode

11:44:01 AM: [sane] Warning: Lost connection to watchman, reconnecting..

Can anyone help me with this issue?

android
react-native
expo
create-react-native-app
asked on Stack Overflow Aug 28, 2017 by narahan

3 Answers

0

make sure you are using minimal API 19 on your emulator, its work on me somehow.

answered on Stack Overflow Jun 21, 2018 by salih kallai
0

you probably need to reinstall the android app, you can do it with expo install:android then try opening it again

answered on Stack Overflow Aug 20, 2020 by Paja Aleksic
0

Try to remove the apk

rm -rf ~/.expo/android-apk-cache

Source: https://www.bountysource.com/issues/43329081-error-staring-android-emulator

answered on Stack Overflow Jan 13, 2021 by Nghi Nguyen

User contributions licensed under CC BY-SA 3.0