After pulling from the git repo after some time and few changes done by my colleagues, running app on my android device stopped working. I was able to run my app on my device before with usb debugging enabled, but now I get the following error after running the command ionic run android:
No target specified, deploying to emulator Error: No emulator images
(avds) found.
1. Download desired System Image by running: /Users/myUser/Library/Android/sdk/tools/android sdk
2. Create an AVD by running: /Users/myUser/Library/Android/sdk/tools/android avd HINT: For a
faster emulator, use an Intel System Image and install the HAXM device
driver
Go to the Android Studio open the AVD Manager then create AVD(if not yet created) and launch it in the emulator. Now execute the command ionic run android it will run correctly.
Possible duplicate of adb not finding my device / phone (MacOS X)
I had the same problem and can resolve this by restart my device and my Mac.
Related
I am new to React Native and Mobile App Development. I am trying to start up my bare React Native project in my Emulator and it gives me issue to set up.
I get this error when I click on the button a to set to Android Emulator from my command terminal
Couldn't adb reverse: adb.exe: error: device offline
Couldn't start project on Android: Error running adb: device offline
please how do I fix it
here is my system variable
C:\Users\JUWONCALEB.DESKTOP-CMA289U\AppData\Local\Android\Sdk
running adb devices after running adb kill-server. Security question pops up after that. Worked for me.
1/ run npm start
2/ go to http://localhost:19002
3/ press on Lan and copy the URL under it eg. exp://192.168.1.3:19000
4/ download expo app in your device from your android studio.
5/ open expo and click Enter URL manually and paste the URL u copied in the previous step
6/ if needed: reload by clicking "r" button in your command line
Try to:
1 Launch the android emulator (any sdk is fine as any model)
2 open the settings IN the emulator
3 activate developer mode
My development environment is in ubuntu on wsl2 with vscode as editor running on windows using the remote wsl extension. I am running it on a physical android device using the Expo Go app using the tunnel connection on the same wifi network.
Everything works fine from scanning the QR Code to editing the code and it auto refreshes everytime I make changes on vscode. The problem is when I became idle(not making changes) for a short time, the connection somehow times out giving the error:
Cannot connect to Metro.
Cannot connect to Metro screenshot
What should be done here? How to disable the timeout if there's a way?
I'm trying to emulate my ionic 4 app into Android Emulator
so I run the command:
sudo ionic cordova emulate android --prod
I get this error:
BUILD SUCCESSFUL in 1s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
/Users/esham/Desktop/magazine-app/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/esham/Library/Android/sdk (DEPRECATED)
No emulator images (avds) found.
1. Download desired System Image by running: /Users/esham/Library/Android/sdk/tools/android sdk
2. Create an AVD by running: /Users/esham/Library/Android/sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
[ERROR] An error occurred while running subprocess cordova.
cordova emulate android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
But I have 3 ADV on ADV Manager!!
And I could run any one of them by terminal for examble emulator #Pixel_2_API_26
These the list of ADV I have: emulator -list-avds
Pixel_2_API_26
Pixel_2_API_28
Pixel_3_API_28
When I'm running command android list avd getting:
The following Android Virtual Devices could not be loaded:
Name: Pixel_3_API_28
Path: /Users/esham/.android/avd/Pixel_3_API_28.avd
Error: Google pixel_3 no longer exists as a device
---------
Name: Pixel_2_API_26
Path: /Users/esham/.android/avd/Pixel_2_API_26.avd
Error: Google pixel_2 no longer exists as a device
---------
Name: Pixel_2_API_28
Path: /Users/esham/.android/avd/Pixel_2_API_28_1.avd
Error: Google pixel_2 no longer exists as a device
So it doesn't make any sense! I have 3 ADV with all supported levels by cordova and keep saying No emulator images (avds) found.
These my environment setup on macOS:
export ANDROID_SDK=$HOME/Library/Android/sdk
export PATH=$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$PATH
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH/:$ANDROID_HOME/platform-tools
I have solved the issue by adding --emulator=amulator_name
So the full command will be:
ionic cordova emulate android --prod --emulator=Pixel_3_API_28
If you run "ionic cordova run android" it's automatic run emulate by default. so try this. I hope it fixed your issue. firstly you check you Emulated Android path and it is properly downloaded or not. You run "ionic cordova resources" it checks all resources if fine or not. You need to be install anything or not. so try this.
PhoneGap is not installed in my mac. Now, I want to run a PhoneGap project with Xcode and I am getting this error. Can anyone tell me how to run the PhoneGap project in Xcode? I want to run the project from Junkyard-Jumbotron.
I can't comment yet, have you checked in the file directory to see if the file exists? Make sure you have met all of the requirements.
install the following:
- Xcode 4.3+
- Xcode Command Line Tools
- Intel-based computer with Mac OS X Lion or greater (10.7+)
- Necessary for installing on device:
-----Apple iOS device (iPhone, iPad, iPod Touch)
-----iOS developer certificate
Install the iOS SDK and Apache Cordova
- Install Xcode from the Mac App Store or Apple Developer Downloads
- Install the Xcode Command Line Tools (Xcode Preferences -> Downloads -> Components -> Command Line Tools -> Install).
- Download the latest release of [Apache PhoneGap
-----extract its contents
-----Apache Cordova iOS is found under lib/ios
Install CordovaLib
-Download the Cordova source
-Extract to source to their final permanent location on your hard drive (for example, to ~/Documents/CordovaLib-2.X.X)
- There is no step 3
Here is the link to getting started on a new project:
http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS
I have build an android application using NativeScript but now i want to install it in my android phone but i don't know which .apk file i have to take to install the application in my phone.
According to the {N} docs you should execute tns deploy android on the command line. This will install your app onto the currently connected device. After the app has been installed, it will automatically start on Android.
If you want your app to be compiled before installing it on your device, you should execute tns run android on the command line. This will prepare, build and deploy your app.
You can find all the cli commands on the github page: https://github.com/NativeScript/nativescript-cli