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

#1

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 also tried running ‘npm start’ and then ‘a’ for the android option but had the same error.

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).

Can anyone help me with this issue?

0 Likes

#2

I also just got this error when trying to run it on the expo app on my device:


 [sane] Warning: Lost connection to watchman, reconnecting..
/Users/minimoe/Library/LaunchAgents/com.github.facebook.watchman.plist: service already loaded
0 Likes

#3

Update here is the link when I run “exp diagnostics”

https://exp-xde-diagnostics.s3.amazonaws.com/moemkr-1449eca3-262d-473f-97f8-6bf550e9d50b.tar.gz

0 Likes

#4

I suspect the problem is coming from TypeError: Cannot read property 'length' of null
Which means somewhere inside a promise X.length is trying to be accessed with X is null.

If you can reproduce on snack.expo.io we might be able to find the issue.

0 Likes

#5

not sure what it was exactly, but I git reverted to an old version and it worked, I guess it was something wrong in the code. Though I wish the error would have highlighted which page or line to refer to as my repository is quite lengthy

0 Likes

#6

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

0 Likes

#7

I uninstalled the app on the Android Emulator and and used the “Run on Android device/emulator” from the Metro Bundler on http://localhost:19002/to fix it for me.

0 Likes