Nativescript project running with Visual Studio Emulator

后端 未结 1 2080
轮回少年
轮回少年 2020-12-06 12:36

I have a Nativescript application that I\'m developing using VS Code and have no issues when I try to run it using the Nativescript launch configurations from the Nativescri

相关标签:
1条回答
  • 2020-12-06 13:31

    Microsoft MSDN say :

    If the emulator is running, but it does not appear to be connected to ADB or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB.

    The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory.


    Here We Go!! Step By Step ;)

    Copy Your ANDROID SDK PATH for me it look like this :


    To modify the Android SDK path used by the emulator:

    1. Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.


    1. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools in the folder tree on the left.

    Note : if Android SDK Tools folder doesn't exist, Create it under WOW6432Node, And open it, And Create a String Value name it Path:)

    1. Modify the Path registry variable to match the path to your Android SDK.


    1. Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.


    Now! Open Your Terminal (CMD), and Run ADB command

    adb devices -l

    YES YES !! The Visual Studio Emulator is running, and connected to ADB!


    HERE WE GOO !!

    Now We Want To Create A Demo App (for example FIRSTZAKI) ZAKI is my nickname :p

    On Terminal (CMD) :

    tns create FIRSTZAKI

    Choose Android Platform

    cd FIRSTZAKI\

    tns platform add android

    Check if VS EMULATOR is ready!

    tns devices

    YES YES ^^

    Finally Step (RUN/BUILD) :

    tns run android

    WOW ... Great :)

    AND .. Good Luck ♥ — ZAKI

    0 讨论(0)
提交回复
热议问题