native-run: ADB deployment and --list option unhandled error
Hi all.
Just today i updated my ionic cli to 5.0.0, but could not run on android anymore as it asked for native run Ok, installed it. No run either…
[ERROR] Error while getting native targets for android: No suitable API installation found.
native-run needs a fully installed SDK Platform to run your app.
- Run native-run android --sdk-info to see missing packages for each API level.
- Install missing packages in Android Studio by opening the SDK manager.
This error occurred while using native-run. You can try running this command with --no-native-run, which will
revert to using Cordova.
Then i tried with the --no-native-run flag, and then it ran fine. I’m using ADB to connect my phone.
The problem is, as i’m trying to run without that ugly flag (no-native-run), and tried to list the connected devices. I got this output:
lucio@pop-os:~/holonfix/mechanicionic$ native-run --list
events.js:173
throw er; // Unhandled 'error' event
^
Error: connect ENOENT /var/run/usbmuxd
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)
Emitted 'error' event at:
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
My environment is as follows:
Ionic:
Ionic CLI : 5.0.0 (/home/lucio/.nvm/versions/node/v11.12.0/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.3
Cordova:
Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, (and 18 other plugins)
Utility:
cordova-res : not installed
native-run : 0.1.1
System:
Android SDK Tools : 26.1.1 (/home/lucio/Android/Sdk)
NodeJS : v11.12.0 (/home/lucio/.nvm/versions/node/v11.12.0/bin/node)
npm : 6.9.0
OS : Linux 4.18
If you could try to replicate the error and solve it, it would help a lot. Also, what do i need to do to run the app without the flag? Is there something i’m missing to configure or is it the ADB tool? If it’s the tool, please, add the support. I hate to have one more cable in my desk, so i always use wireless to run my android app with ionic.
Please and thanks!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 27 (15 by maintainers)
@luciojb Can this be closed then? 😄
Haha, I thought there was something when i saw the code in the src/android/utils/adb.ts getDevices method in this repo.
I think so too, but i don’t know the impact over the people who are using the global one. Maybe show a message when trying to run or something like that, like “Make sure you are using the Android SDK provided ADB tool”.
I updated my path to
export PATH=$PATH:$ANDROID_HOME/platform-tools
and removed the global one.@luciojb The usbmuxd unhandled error is actually because the bare
--list
is trying to list iOS devices as well. We’re working on a better solution for that, too.You can list just Android devices with
native-run android --list
.