Starting app on android emulator for meteor never finishes - android

Today I wanted to test how Meteor's android build worked. So I installed Meteor and created a test to-do app per their instructions. Then pr. instructions from here I installed the Java SDK, and confirmed I had the Android SDK from when I installed Visual Studio 2015.
Then came my first problem. When I tried to run meteor add-platform android from the command prompt. I got the error Cannot find module ‘is-property’, and quickly learned to fix this by cd'ing to the directory missing the module and running npm install is-property. A hat tip to this thread for the solution.
Okay, one more time: meteor add-platform android and this time with success. I then ran meteor run android, and sure enough, an emulator launched with my app. Or almost. Because the first message that greeted me was Application Error - The connection to the server was unsuccessful (http://localhost:12784) and the app crashed.
After searching around a bit, it seemed that because the emulator was so damn slow, the meteor script timed out and caused the crash. So I then tried installing Android Studio to use Android AVD manager. But now the emulator wouldn't even launch, and I got stock with the following:
Starting app on android emulator and then... nothing.
So I tried to uninstall all android sdks, android studio, and meteor.
Then I tried to
Installing meteor again.
Install only the Android SDK command line tools.
Added the Android SDK to my environment variables.
Ran the android.bat to make sure I installed almost all the newest tools and images plus the Intel x86 Emulator Accelerator (HAXM installer)
I Then tried running the meteor run android command again, only to get stuck at starting app on android emulator as seen in the first picture.
Let the Starting app on android emulator run for an hour plus to see if things were just slow.
I have also tried to follow advice from the following resources without help:
Android Emulator Hangs
Meteor with android having issue starting app on the device and emulator
Creating a new AVD- CPU/ABI field show 'No System images installed'
Unable to create Android Virtual Device
And btw, here is how my AVD config looks like
So what have I done wrong? Everything would not be a surprising answer. Jokes aside, what is it I need to do to get a proper running android emulator up for my meteor app on windows 10?

I was getting exactly the same thing, but I finally figured out the problem.
I tried running the emulator from the command-line:
emulator -avd Android_Emulator
This actually gave me a useful error message:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM is not installed on this machine
This StackOverflow thread helped figure out how to install this: Intel X86 emulator accelerator (HAXM installer) VT/NX not enabled
And then it worked! Really really slow! But it worked.

Try removing your Virtual Device and recreate it again, or try a different one. Next, rebuild your meteor app proyect.
Removing you virtual device
Android-Studio >> Configure >> AVD Manager >> Delete
In my case, no issues about Intel HXAM (already installed), but the virtual device was working time ago, suddenly, the "Starting app on android emulator" never ended. I think, its about cordova+npm related issues. So, try this.
In meteor proyect folder, try rebuild de app-cordova things using
Deleting .meteor/local/corova-build
Deleting .meteor/node_modules
Removing and adding android plaftorm with meteor remove-plarform android && meteor add-platform android
Running the commands meteor rebuild && meteor npm install
Ensure compatibility NodeJS libraries. In my case, meteor 1.8.2, nodejs 12.9.

Related

Android Emulator process terminated

When I try to run the emulator after few seconds it shows "The emulator process for AVD "DEVICE NAME" has terminated" on latest android studio electric el.
I have an AMD processor laptop. and I am doing flutter projects on android studio. Even just opening android studio with new project its showing same process termination as above.
These are the things I have tried to solve the emulator process termination down below:
*I tried installing uninstalling android studio
*I tried installing previous version of android studio
*I tried copy pasting JRE and JDE file in c:/program file/android/android
*I tried installing command process tool (latest) in SDK manager
*I tried installing latest android emulator.
*I tried installing other version of android like 10,11,12,13
*I tried installing different phones like pixel 2,3,4.. (with or without play store and x86,x64)
*I tried Vulkan = off, GLDirectMem = on (C:\Users\yourusername.android folder advancedFeatures.ini,)
*I have more then 100GB disc space
*I have increased 2gb to 20gb (2000mb) in AVD manager phone advanced settings.
*I have terminated all the background process and restart even did restarting the pc
*I tried reinstalling windows
*I tried renaming to vulkan-1.dll
As I have AMD processor (Intel x86 Emulator Accelerator (HAXM installer)) this doesn't work
*I changed ANDROID_HOME path on environment variables.
even I tried every other thing like the link down below:
Android Emulator The emulator process for AVD was killed. Windows Intel
I just need to run the AVD manager or the emulator for flutter.
Update: I just tried android 9.0 (pie) and then I was able to change Emulated Performance Graphics from automatic to software and it was running but when I selected It to hardware it throws same error message. Can any one please fix the emulator problem. I cant test any app on emulator.

Unable to run react native application in emulator in amd based pc?

I am trying to run react native in an emulator in my AMD based Pc. I get this error saying:
Execution failed for task ':app:installDebug'.
Failed to install on any devices.
I have shown this error in the below image:
I am following the official document.
In the official document, click the tab called "Building Projects with
Native Code". For Development OS : Windows and Target OS :
Android.
Note: Due to my AMD processor I have not installed Intel x86 Emulator Accelerator HAXM, see below image:
So as a work around for AMD processor I have followed this stackoverflow answer, to install ABI called arm64-v80 android 7.0 Nougat when creating a Virtual Device in Android studio. My virtual device is ready and also running now, see below image:
I can correctly start my emulator as shown below image:
MY Installed SDK platforms are:
My SDK tools are show below:
I don't know what is wrong? Please help???
It seems that your react-native run-android command is trying to run the app on an API 24 simulator and you started an API 25 one.
Check all the API 24 dependencies and start the API 24 emulator. It should work.
Here is a configuration that works in my case:
Additional notes:
From your pictures the emulator is not started yet. Check that simulator is really started yet.
Make sure you use Android Studio 3.1.4 and not 3.2.0 if you have RN 0.57.
Try to sync gradle and run the project from Android studio, it might work or give you more error info
Try to Add the API 24 deps and to start an API 25 simulator (From what I know AVD might require some deps from and older API level.
On pc, you should run x86 based emulator.
Try to restart your ADB server. You need to run 2 separate commands:
adb kill-server - to kill the ADB server.
and
adb start-server - to start the server again.
Hope it helps :)

How to launch Android emulator from command line under Ubuntu, without having Android Studio running?

When the IDE Android Studio is running, it is very easy to launch the Android emulator from the command line under Ubuntu. I my case, I just issue:
$HOME/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-i386 -avd My_Galaxy_Nexus
But when the IDE is not running, this fails. I get next error message (and a warning that can be ignored, in my opinion):
emulator: WARNING: encryption is off
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
I suppose this is due to the fact that the Android Studio IDE is creating an environment and loading libraries (the Qt platform) that I am missing for launching the emulator as stand-alone.
Since the IDE is very heavy in consuming resources on my laptop, I would prefer to launch only the emulator, because it is a useful way for me to have WhatsApp running without having an Android or Mac smartphone.
My question is: how to launch the emulator as a stand-alone app?
The QT platform error might be because you are not running your command in "tools" directory.
And for whatsapp you can always use genymotion or nox emulators if you don't really need to develop anything.

React native fail to run-android even when emulator running

Running the command react-native run-android fails with the following output:
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
The curious thing about this problem is that an emulator is running. adb devices returns
List of devices attached
emulator-5554 device
If these details help, its running in Linux, with the emulator set as Android 6.0 API Level 23, using Google APIs Intel Atom (x86).
I had the same issue just last week. I tried building the project thru Android Studio. I think one of the reasons of this error is that, the build looks for the updated (or compatible) version of the Gradle. What I did was just let Android Studio be the one to update the gradle on the first build.
After that my app runs and builds without any issues.
Hope this helps.

Unable to launch android emulator in Mac

I have been working on an android project, I am using android studio on my iMAC[Software OS X 10.9.5, Graphics Intel HD Graphics 5000 1024 MB, Processor 1.4 GHz Intel Core i5].
When i try to open my application on an android emulator it get this error-
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
I can find so many similar issues with solution on Google & SO, but i am unable to use those solutions for MAC???
I followed all the steps given here but with no luck, still unable to launch emulator. I think there is something to do with mac os.
Can anyone tell me how to do this on MAC ??
Thanks
First, make sure that the Intel HAXM is up to date. You update it by opening the SDK and selecting it in the list. (As of 2016-07-08, the latests HAXM version is 6.0.3).
Then, on Mac, the Android SDK gets installed at: /Users/username/Library/Android/sdk/, therefore, you will need to run the script as sudo, as follows:
sudo sh ~/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
If all goes well, the script prints the message: "Silent installation Pass!"
Then, restart Android Studio and run your app with the desired AVD.
I know I'm late, but here it goes.
Delete all AVD's that you currently have.
Go to Preferences >> Android SDK >> SDK Tools
Uninstall Android Emulator
Restart Android Studio.
Re-install Android Emulator from the same place.
Create a new emulator. And Voila !
What i personally did, in the process of fixing this.
I actually re-installed entire android studio. Followed this
Fixed my $PATH variables. Followed this
Then i tried re-installing Android Emulator, which worked for me.
Hope this Helps.
Problem in my case turned out to my .zshrc where my ANDROID_HOME was exported to a wrong value. Take a look at your .bashrc or .zshrc

Categories

Resources