-
-
Notifications
You must be signed in to change notification settings - Fork 197
tns run android (without started emulator/connected device) fails to start app #2486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, I am new to NativeScript and have been trying to go through the setup information on the website here: https://docs.nativescript.org/angular/tutorial/ng-chapter-1 I am experiencing the exact same problem as described above. Is there any solution to this? - It seems the problem comes from the nativescript-sdk-examples-ng kit After waiting for the timeout option to kick in, I get the following output npm - 5.6.0 Cheers, |
Hi @KristiyanFxy, |
Hi @Plamen5kov, Thanks for the prompt reply. My issue is when I try to run
That is pretty odd because I have 9GB ram left available and nor my CPU or RAM spike. I tried the suggestions from #2210 & #2092 without success. To reproduce the problem I follow the steps found here: https://docs.nativescript.org/angular/tutorial/ng-chapter-1
Either this is a very specific problem or it is related to my development environment - either way, any suggestions will be much appreciated! cmd output ------------------------------------------------------------ Z:\Work\Work 2018\Associations-Game_repository\Associations-game>tns run android --log trace stderr: Error while executing node-gyp -v: Command failed: node-gyp -v Exec "C:\Android\android-sdk\platform-tools\adb" version stderr: stderr: '', exitCode: 1 } The result of checking is Android Emulator installed is:
Error while executing mono --version: Command failed: mono --version Exec git --version stderr: Error while executing gradle -v: Command failed: gradle -v Exec "C:\Program Files\Java\jdk1.8.0_152\bin\javac" -version System information: Z:\Work\Work 2018\Associations-Game_repository\Associations-game> |
@KristiyanFxy while I try to reproduce your issue, can you run Most likely it's a problem with the environment set up, so you could try following these steps in order to setup your machine: https://docs.nativescript.org/start/ns-setup-win |
Hi @Plamen5kov, First, thank you for your help and I have found the solution to multiple problems people are experiencing when trying to set up their environment. The problems I incurred:
1. Black screen when running AVD emulatorProblem & Suspected reasonWhen I was trying to run an android emulator using AVD Manager, as Administrator, I was getting a back screen. The reason was that I did not have all the necessary Android SDK packets. This might be because I already had Visual Studio & c# Xamarin extension installed that after running Fix
Quick caviate: If you do not install HAXM, you will see the following message when trying to run the emulator: "Please encure Intel HAXM is properly Installed and usable. CPU acceleration status: HAXM is not installed on this machine"
Note: I have plenty of RAM so I left the default RAM amount, but you might need to edit that for your specific system. That being said, I increase VM Heap to 512 because the virtual machine was not loading. 2. AVD Android emulator is laggy when runningProblem & Suspected reasonMy uneducated assumption in my case the problem was forcing my old CPU I5-3750k to calculate polygons which the processor is not very successful at. Fix
3.
|
@KristiyanFxy, let me just say waw! Great explanation. I commend you for taking the time to explain all the steps to fix issues users might have. I'll link this answer to the FAQs. |
I was having the same problem, same error, and what was missing was the actual "emulator" package from android. I installed it with:
And now it works. Running |
@Plamen5kov I want to ask a simple question. After running the command in Do I again need to install Android studio and AVD explicitly? |
The quoted section from NativeScript/nativescript-cli#2486 is redundant and can fall off sync. It also makes the whole article rather messy and difficult to read.
@yashwp did you find the solution? I have the same outcome. |
@yashwp Same here :( |
I was learning swift to generate IOS apps for the past three weeks and have installed x-code prior to learning nativescript. I notice the root of the problem to be from the set-up to install nativescript CLI as it was instructed to do so in the step by step installation we all encountered during the process where it asks us if we have x-code installed. Since I did, i selected Yes and the process skipped that part. The path becomes the problem and according to StackOverflow: "This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools, when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode)" Although his solution did not help me. I found that resetting the xcode-select path would and did it. The solution that worked for me is to reset the path and so you dont have to re-install xcode. Run this line: sudo xcode-select -r Im also using MacOS, and the android package wasnt on the right path. This did it for me from terminal: pico ~/.bash_profile export ANDROID_HOME=/Users/$USER/Library/Android/sdk source ~/.bash_profile ---- |
Thank you @IamGiel. I was also using VSCode and |
You will also receive this error if emulator.exe does not exist here: |
On Windows with Node.js 6.9.5 and NativeScript CLI 2.5.0
Steps to reproduce:
Meanwhile, CLI is hanging on:
The text was updated successfully, but these errors were encountered: