nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

Problem while setting up the nativescript

Open abhisekgithub opened this issue 10 years ago • 12 comments

Hello, I have installed the nativescript as per the http://docs.nativescript.org/start/ns-setup-win page. But when I install the nativescript it shows me an warnd that "There is a error while executing the javac... Please set the JAVA_HOME ...".

But I have double check my jdk installation and the javac command is also working without the complete path. And my JAVA_HOME is set as "C:\Program Files\Java\jdk1.8.0_72\bin" And ANDROID_HOME is set as "C:\Users\Personal\AppData\Local\Android\android-sdk" But I can't use the "tns platform add android" command due to the javac error.

I have tried differently various times, but no hope. Though the nativescript looks very interesting to me, but I thin I have to quit for this problem. I am on windows7 64 bit pc

abhisekgithub avatar Feb 04 '16 11:02 abhisekgithub

Hi @abhisekgithub , Can you execute tns doctor --log trace and send us the output?

rosen-vladimirov avatar Feb 04 '16 12:02 rosen-vladimirov

Hello,

  Thanks for the quick response, Here I am going to provide the out put

of the command. Will look forward for your response,Because I am very much eager to work with nativescript.

D:\groceries\sample-Groceries>tns doctor --log trace execFile: C:\Users\Personal\AppData\Local\Android\android-sdk\platform-tools\adb "help" spawn: C:\Users\Personal\AppData\Local\Android\android-sdk\tools\android.bat "-- help"

   Usage:
   android [global options] action [action options]
   Global options:

-s --silent : Silent mode, shows errors only. -v --verbose : Verbose mode, shows errors, warnings and all messages. --clear-cache: Clear the SDK Manager repository manifest cache. -h --help : Help on a specific command.

                                                                Valid
                                                                actions
                                                                are
                                                                composed
                                                                of a

verb and an optional direct object:

  • sdk : Displays the SDK Manager window.
  • avd : Displays the AVD Manager window.
  • list : Lists existing targets or virtual devices.
  • list avd : Lists existing Android Virtual Devices.
  • list target : Lists existing targets.
  • list device : Lists existing devices.
  • list sdk : Lists remote SDK repository.
  • create avd : Creates a new Android Virtual Device.
  • move avd : Moves or renames an Android Virtual Device.
  • delete avd : Deletes an Android Virtual Device.
  • update avd : Updates an Android Virtual Device to match the folders of a new SDK.
  • create project : Creates a new Android project.
  • update project : Updates an Android project (must already have an AndroidManifest.xml).
  • create test-project : Creates a new Android project for a test package.
  • update test-project : Updates the Android project for a test package (must already have an AndroidManifest.xml).
  • create lib-project : Creates a new Android library project.
  • update lib-project : Updates an Android library project (must already have an AndroidManifest.xml).
  • create uitest-project: Creates a new UI test project.
  • update adb : Updates adb to support the USB devices declared in the SDK add-ons.
  • update sdk : Updates the SDK by suggesting new platforms to install if available.

Exec npm -v stdout: 2.14.12

stderr: spawn: java "-version" Exec node-gyp -v stdout: stderr: 'node-gyp' is not recognized as an internal or external command, operable program or batch file.

Exec "C:\Users\Personal\AppData\Local\Android\android-sdk\platform-tools\adb" ve rsion stdout: Android Debug Bridge version 1.0.32 Revision eac51f2bb6a8-android

stderr: spawn: C:\Users\Personal\AppData\Local\Android\android-sdk\tools\android.bat "-h " Exec mono --version stdout: stderr: 'mono' is not recognized as an internal or external command, operable program or batch file.

Exec git --version stdout: git version 2.7.0.windows.2

stderr: Exec gradle -v stdout: stderr: 'gradle' is not recognized as an internal or external command, operable program or batch file.

Exec "C:\Program Files\Java\jdk1.8.0_72\bin\bin\javac" -version stdout: stderr: The system cannot find the path specified.

System information: { procInfo: 'nativescript/1.5.1', platform: 'win32', os: 'Windows 7 Ultimate 6.1.7601', shell: 'C:\Windows\system32\cmd.exe', dotNetVer: '4.0.30319', procArch: 'x64', nodeVer: 'v4.2.6', npmVer: '2.14.12', javaVer: '1.8.0', nodeGypVer: null, xcodeVer: null, itunesInstalled: false, cocoapodVer: null, adbVer: 'Android Debug Bridge version 1.0.32', androidInstalled: true, monoVer: null, gitVer: '2.7.0.windows.2', gradleVer: null, javacVersion: null } Starting watch on killswitch C:\Users\Personal\AppData\Local\Temp\Personal\KillS witches\cli Initializing analytics statuses. Analytics statuses: { TrackFeatureUsage: 1, TrackExceptions: 0 } Trying to track feature 'CLI' with value 'doctor'. execFile: C:\Users\Personal\AppData\Local\Android\android-sdk\platform-tools\adb "help" NOTE: You can develop for iOS only on Mac OS X systems. To be able to work with iOS devices and projects, you need Mac OS X Mavericks or later.

spawn: C:\Users\Personal\AppData\Local\Android\android-sdk\tools\android.bat "li st" "targets"

Available Android targets:

id: 1 or "android-22" Name: Android 5.1.1 Type: Platform API level: 22 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800, WXGA800-7in Tag/ABIs : no ABIs.

Directories found in C:\Users\Personal\AppData\Local\Android\android-sdk\build-t ools are 22.0.1 Versions found in C:\Users\Personal\AppData\Local\Android\android-sdk\build-tool s are 22.0.1 Selected targetSdk is: 22 Directories found in C:\Users\Personal\AppData\Local\Android\android-sdk\extras
android\m2repository\com\android\support\appcompat-v7 are 18.0.0, 19.0.0, 19.0.1 , 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1 , 23.0.0, 23.0.1, 23.1.0, 23.1.1, maven-metadata.xml, maven-metadata.xml.md5, ma ven-metadata.xml.sha1 Versions found in C:\Users\Personal\AppData\Local\Android\android-sdk\extras\and roid\m2repository\com\android\support\appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 1 9.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 2 3.0.0, 23.0.1, 23.1.0, 23.1.1 Selected AppCompat version is: 22.2.1 Error executing command 'javac'. Make sure you have installed The Java Developme nt Kit (JDK) and set JAVA_HOME environment variable. You will not be able to build your projects for Android. To be able to build for Android, verify that you have installed The Java Develop ment Kit (JDK) and configured it according to system requirements as described in https://github.com/NativeScript/nativescript-cli#system-requiremen ts.

These warnings are just used to help the NativeScript maintainers with debugging if you file an issue. Please ignore them if everything you use NativeScript for is working fine.

On Thu, Feb 4, 2016 at 5:34 PM, Rosen Vladimirov [email protected] wrote:

Hi @abhisekgithub https://github.com/abhisekgithub , Can you execute tns doctor --log trace and send us the output?

— Reply to this email directly or view it on GitHub https://github.com/NativeScript/nativescript-cli/issues/1447#issuecomment-179790974 .

Abhisek Malakar

abhisekgithub avatar Feb 04 '16 12:02 abhisekgithub

I think I have detected the issue, THe JAVA_HOME path should not include the bin folder. But it should be clearly mentioned in the document

abhisekgithub avatar Feb 04 '16 12:02 abhisekgithub

Hi @abhisekgithub ,

It's already in our docs: https://github.com/NativeScript/nativescript-cli#windows As you can see, the example says

For example: JAVA_HOME=C:\Program Files\Java\jdk1.8.0_66

Did you resolve your issue after setting your JAVA_HOME and restarting your shell?

rosen-vladimirov avatar Feb 04 '16 15:02 rosen-vladimirov

@abhisekgithub as we've not heard back from you, I'm closing this thread. Feel free to reopen it in case you still have problems or concerns.

rosen-vladimirov avatar Feb 09 '16 15:02 rosen-vladimirov

Yes, Thanks. The issue get resolved

On Tue, Feb 9, 2016 at 8:57 PM, Rosen Vladimirov [email protected] wrote:

@abhisekgithub https://github.com/abhisekgithub as we've not heard back from you, I'm closing this thread. Feel free to reopen it in case you still have problems or concerns.

— Reply to this email directly or view it on GitHub https://github.com/NativeScript/nativescript-cli/issues/1447#issuecomment-181913812 .

Abhisek Malakar

abhisekgithub avatar Feb 10 '16 05:02 abhisekgithub

**Hello there,

I am not able to find any solution with below issue.**

execFile: /opt/android-sdk-linux/platform-tools/adb "help" execFile: /opt/android-sdk-linux/platform-tools/adb "help" spawn: /opt/android-sdk-linux/platform-tools/adb "--help" Socket { connecting: false, _hadError: false, _handle: Pipe { bytesRead: 0, _externalStream: {}, fd: 14, writeQueueSize: 0, owner: [Circular], onread: [Function: onread], reading: true }, _parent: null, _host: null, _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: null, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: { [Function: bound onceWrapper] listener: [Function: onend] }, finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], close: [Function] }, _eventsCount: 4, _maxListeners: undefined, _writableState: WritableState { objectMode: false, highWaterMark: 16384, needDrain: false, ending: false, ended: false, finished: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: true, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 0, prefinished: false, errorEmitted: false, bufferedRequestCount: 0, corkedRequestsFree: CorkedRequest { next: null, entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, destroyed: false, _bytesDispatched: 0, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null } Exec uname -a stdout: Linux mandloi 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

stderr: Exec npm -v stdout: 4.1.2

stderr: spawn: java "-version" Exec node-gyp -v stdout:
stderr: module.js:472 throw err; ^

Error: Cannot find module 'graceful-fs' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/usr/share/node-gyp/lib/node-gyp.js:12:10) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3)

Exec '/opt/android-sdk-linux/platform-tools/adb' version stdout: Android Debug Bridge version 1.0.36 Revision 0e9850346394-android

stderr: spawn: /opt/android-sdk-linux/tools/android "-h" Result when throw error is false: { stdout: '\n Usage:\n android [global options] action [action options]\n Global options:\n -s --silent : Silent mode, shows errors only.\n -v --verbose : Verbose mode, shows errors, warnings and all messages.\n --clear-cache: Clear the SDK Manager repository manifest cache.\n -h --help : Help on a specific command.\n\n Valid\n actions\n are\n composed\n of a verb\n and an\n optional\n direct\n object:\n- sdk : Displays the SDK Manager window.\n- avd : Displays the AVD Manager window.\n- list : Lists existing targets or virtual devices.\n- list avd : Lists existing Android Virtual Devices.\n- list target : Lists existing targets.\n- list device : Lists existing devices.\n- list sdk : Lists remote SDK repository.\n- create avd : Creates a new Android Virtual Device.\n- move avd : Moves or renames an Android Virtual Device.\n- delete avd : Deletes an Android Virtual Device.\n- update avd : Updates an Android Virtual Device to match the folders\n of a new SDK.\n- create project : Creates a new Android project.\n- update project : Updates an Android project (must already have an\n AndroidManifest.xml).\n- create test-project : Creates a new Android project for a test package.\n- update test-project : Updates the Android project for a test package (must\n already have an AndroidManifest.xml).\n- create lib-project : Creates a new Android library project.\n- update lib-project : Updates an Android library project (must already have\n an AndroidManifest.xml).\n- create uitest-project: Creates a new UI test project.\n- update adb : Updates adb to support the USB devices declared in the\n SDK add-ons.\n- update sdk : Updates the SDK by suggesting new platforms to install\n if available.\n', stderr: '', exitCode: 1 } Exec mono --version stdout:
stderr: /bin/sh: 1: mono: not found

Exec git --version stdout: git version 2.7.4

stderr: Exec gradle -v stdout:

Gradle 2.10

Build time: 2016-01-26 15:17:49 UTC Build number: none Revision: UNKNOWN

Groovy: 2.4.5 Ant: Apache Ant(TM) version 1.9.6 compiled on July 8 2015 JVM: 1.8.0_121 (Oracle Corporation 25.121-b13) OS: Linux 4.4.0-59-generic amd64

stderr: Exec "/usr/lib/jvm/java-8-oracle/bin/javac" -version stdout:
stderr: javac 1.8.0_121

System information: { procInfo: 'nativescript/2.5.0', platform: 'linux', os: 'Linux mandloi 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux\n', shell: '/bin/bash', dotNetVer: null, procArch: 'x64', nodeVer: 'v7.5.0', npmVer: '4.1.2', javaVer: '1.8.0', nodeGypVer: null, xcodeVer: null, xcodeprojGemLocation: null, itunesInstalled: false, cocoapodVer: null, adbVer: 'Android Debug Bridge version 1.0.36', androidInstalled: true, monoVer: null, gitVer: '2.7.4', gradleVer: '2.10', javacVersion: '1.8.0_121' } Looking for project in '/home/jaswant' Looking for project in '/home' Looking for project in '/' No project found at or above '/home/jaswant'. No project found at or above '%s' and neither was a --path specified. Initializing analytics statuses. Analytics statuses: { TrackFeatureUsage: 0, TrackExceptions: 0 } Trying to track feature 'CLI' with value 'doctor'. AnalyticsInstallationID: 42ed6438-d096-4c23-8028-5d59f9a8d91e monitor not started monitor not started monitor not started monitor has started, connecting to http://5752dabccfc54c4ab82aea9626b7338e.monitor-eqatec.com/json.ashx Analytics statuses: { TrackFeatureUsage: 0, TrackExceptions: 0 } Trying to track feature 'NodeJSVersion' with value '7_5_0'. Waiting for analytics to send information. Will check in a 1000ms. Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000 Statistics was sent successfully (xhr). Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 28000 Statistics was sent successfully (xhr). Waiting for analytics to send information. Will check in a 1000ms. Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 27000 Statistics was sent successfully (xhr). execFile: /opt/android-sdk-linux/platform-tools/adb "help" Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000 NOTE: You can develop for iOS only on Mac OS X systems. To be able to work with iOS devices and projects, you need Mac OS X Mavericks or later.

spawn: /opt/android-sdk-linux/tools/android "list" "targets" Result when throw error is false: { stdout: 'Available Android targets:\n----------\nid: 1 or "android-9"\n Name: Android 2.3.1\n Type: Platform\n API level: 9\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854\n Tag/ABIs : default/armeabi\n----------\nid: 2 or "android-14"\n Name: Android 4.0\n Type: Platform\n API level: 14\n Revision: 4\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800\n Tag/ABIs : no ABIs.\n----------\nid: 3 or "android-21"\n Name: Android 5.0.1\n Type: Platform\n API level: 21\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n----------\nid: 4 or "android-22"\n Name: Android 5.1.1\n Type: Platform\n API level: 22\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : default/armeabi-v7a\n----------\nid: 5 or "android-23"\n Name: Android 6.0\n Type: Platform\n API level: 23\n Revision: 3\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n----------\nid: 6 or "android-24"\n Name: Android 7.0\n Type: Platform\n API level: 24\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320\n Tag/ABIs : android-tv/x86, android-wear/armeabi-v7a, android-wear/x86, default/arm64-v8a, default/armeabi-v7a\n----------\nid: 7 or "Google Inc.:Google APIs:22"\n Name: Google APIs\n Type: Add-On\n Vendor: Google Inc.\n Revision: 1\n Description: Android + Google APIs\n Based on Android 5.1.1 (API level 22)\n Libraries:\n * com.android.future.usb.accessory (usb.jar)\n API for USB Accessories\n * com.google.android.media.effects (effects.jar)\n Collection of video effects\n * com.google.android.maps (maps.jar)\n API for Google Maps\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n', stderr: '', exitCode: 0 } Available Android targets:

id: 1 or "android-9" Name: Android 2.3.1 Type: Platform API level: 9 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854 Tag/ABIs : default/armeabi

id: 2 or "android-14" Name: Android 4.0 Type: Platform API level: 14 Revision: 4 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800 Tag/ABIs : no ABIs.

id: 3 or "android-21" Name: Android 5.0.1 Type: Platform API level: 21 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : no ABIs.

id: 4 or "android-22" Name: Android 5.1.1 Type: Platform API level: 22 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : default/armeabi-v7a

id: 5 or "android-23" Name: Android 6.0 Type: Platform API level: 23 Revision: 3 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : no ABIs.

id: 6 or "android-24" Name: Android 7.0 Type: Platform API level: 24 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320 Tag/ABIs : android-tv/x86, android-wear/armeabi-v7a, android-wear/x86, default/arm64-v8a, default/armeabi-v7a

id: 7 or "Google Inc.:Google APIs:22" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 1 Description: Android + Google APIs Based on Android 5.1.1 (API level 22) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : no ABIs.

Directories found in /opt/android-sdk-linux/build-tools are 21.1.2, 22.0.1, 23.0.1, 23.0.3, 24.0.1, 24.0.2 Versions found in /opt/android-sdk-linux/build-tools are 21.1.2, 22.0.1, 23.0.1, 23.0.3, 24.0.1, 24.0.2 Selected version is: undefined Selected targetSdk is: 24 Directories found in /opt/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0-alpha1, 24.0.0-alpha2, 24.0.0-beta1, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, maven-metadata.xml, maven-metadata.xml.md5, maven-metadata.xml.sha1 Versions found in /opt/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0, 24.0.0, 24.0.0, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0 Selected version is: 24.2.1 Selected AppCompat version is: 24.2.1 You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=25.0.2'. Run android from your command-line to install required Android Build Tools.

Analytics statuses: { TrackFeatureUsage: 0, TrackExceptions: 0 } Trying to track feature 'DoctorEnvironmentSetup' with value 'incorrect'. Waiting for analytics to send information. Will check in a 1000ms. Statistics was sent successfully (xhr). There seem to be issues with your configuration. ? Do you want to visit the official documentation? (Y/n) Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000

jaswant@mandloi:~$ tns doctor --log trace execFile: /opt/android-sdk-linux/platform-tools/adb "help" execFile: /opt/android-sdk-linux/platform-tools/adb "help" spawn: /opt/android-sdk-linux/platform-tools/adb "--help" Socket { connecting: false, _hadError: false, _handle: Pipe { bytesRead: 0, _externalStream: {}, fd: 14, writeQueueSize: 0, owner: [Circular], onread: [Function: onread], reading: true }, _parent: null, _host: null, _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: null, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: { [Function: bound onceWrapper] listener: [Function: onend] }, finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], close: [Function] }, _eventsCount: 4, _maxListeners: undefined, _writableState: WritableState { objectMode: false, highWaterMark: 16384, needDrain: false, ending: false, ended: false, finished: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: true, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 0, prefinished: false, errorEmitted: false, bufferedRequestCount: 0, corkedRequestsFree: CorkedRequest { next: null, entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, destroyed: false, _bytesDispatched: 0, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null } Exec uname -a stdout: Linux mandloi 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

stderr: Exec npm -v stdout: 4.1.2

stderr: spawn: java "-version" Exec node-gyp -v stdout:
stderr: module.js:472 throw err; ^

Error: Cannot find module 'graceful-fs' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/usr/share/node-gyp/lib/node-gyp.js:12:10) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3)

Exec '/opt/android-sdk-linux/platform-tools/adb' version stdout: Android Debug Bridge version 1.0.36 Revision 0e9850346394-android

stderr: spawn: /opt/android-sdk-linux/tools/android "-h" Result when throw error is false: { stdout: '\n Usage:\n android [global options] action [action options]\n Global options:\n -s --silent : Silent mode, shows errors only.\n -v --verbose : Verbose mode, shows errors, warnings and all messages.\n --clear-cache: Clear the SDK Manager repository manifest cache.\n -h --help : Help on a specific command.\n\n Valid\n actions\n are\n composed\n of a verb\n and an\n optional\n direct\n object:\n- sdk : Displays the SDK Manager window.\n- avd : Displays the AVD Manager window.\n- list : Lists existing targets or virtual devices.\n- list avd : Lists existing Android Virtual Devices.\n- list target : Lists existing targets.\n- list device : Lists existing devices.\n- list sdk : Lists remote SDK repository.\n- create avd : Creates a new Android Virtual Device.\n- move avd : Moves or renames an Android Virtual Device.\n- delete avd : Deletes an Android Virtual Device.\n- update avd : Updates an Android Virtual Device to match the folders\n of a new SDK.\n- create project : Creates a new Android project.\n- update project : Updates an Android project (must already have an\n AndroidManifest.xml).\n- create test-project : Creates a new Android project for a test package.\n- update test-project : Updates the Android project for a test package (must\n already have an AndroidManifest.xml).\n- create lib-project : Creates a new Android library project.\n- update lib-project : Updates an Android library project (must already have\n an AndroidManifest.xml).\n- create uitest-project: Creates a new UI test project.\n- update adb : Updates adb to support the USB devices declared in the\n SDK add-ons.\n- update sdk : Updates the SDK by suggesting new platforms to install\n if available.\n', stderr: '', exitCode: 1 } Exec mono --version stdout:
stderr: /bin/sh: 1: mono: not found

Exec git --version stdout: git version 2.7.4

stderr: Exec gradle -v stdout:

Gradle 2.10

Build time: 2016-01-26 15:17:49 UTC Build number: none Revision: UNKNOWN

Groovy: 2.4.5 Ant: Apache Ant(TM) version 1.9.6 compiled on July 8 2015 JVM: 1.8.0_121 (Oracle Corporation 25.121-b13) OS: Linux 4.4.0-59-generic amd64

stderr: Exec "/usr/lib/jvm/java-8-oracle/bin/javac" -version stdout:
stderr: javac 1.8.0_121

System information: { procInfo: 'nativescript/2.5.0', platform: 'linux', os: 'Linux mandloi 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux\n', shell: '/bin/bash', dotNetVer: null, procArch: 'x64', nodeVer: 'v7.5.0', npmVer: '4.1.2', javaVer: '1.8.0', nodeGypVer: null, xcodeVer: null, xcodeprojGemLocation: null, itunesInstalled: false, cocoapodVer: null, adbVer: 'Android Debug Bridge version 1.0.36', androidInstalled: true, monoVer: null, gitVer: '2.7.4', gradleVer: '2.10', javacVersion: '1.8.0_121' } Looking for project in '/home/jaswant' Looking for project in '/home' Looking for project in '/' No project found at or above '/home/jaswant'. No project found at or above '%s' and neither was a --path specified. Initializing analytics statuses. Analytics statuses: { TrackFeatureUsage: 0, TrackExceptions: 0 } Trying to track feature 'CLI' with value 'doctor'. AnalyticsInstallationID: 42ed6438-d096-4c23-8028-5d59f9a8d91e monitor not started monitor not started monitor not started monitor has started, connecting to http://5752dabccfc54c4ab82aea9626b7338e.monitor-eqatec.com/json.ashx Analytics statuses: { TrackFeatureUsage: 0, TrackExceptions: 0 } Trying to track feature 'NodeJSVersion' with value '7_5_0'. Waiting for analytics to send information. Will check in a 1000ms. Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000 Statistics was sent successfully (xhr). Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 28000 Statistics was sent successfully (xhr). Waiting for analytics to send information. Will check in a 1000ms. Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 27000 Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000 Statistics was sent successfully (xhr). execFile: /opt/android-sdk-linux/platform-tools/adb "help" Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 28000 NOTE: You can develop for iOS only on Mac OS X systems. To be able to work with iOS devices and projects, you need Mac OS X Mavericks or later.

spawn: /opt/android-sdk-linux/tools/android "list" "targets" Result when throw error is false: { stdout: 'Available Android targets:\n----------\nid: 1 or "android-9"\n Name: Android 2.3.1\n Type: Platform\n API level: 9\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854\n Tag/ABIs : default/armeabi\n----------\nid: 2 or "android-14"\n Name: Android 4.0\n Type: Platform\n API level: 14\n Revision: 4\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800\n Tag/ABIs : no ABIs.\n----------\nid: 3 or "android-21"\n Name: Android 5.0.1\n Type: Platform\n API level: 21\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n----------\nid: 4 or "android-22"\n Name: Android 5.1.1\n Type: Platform\n API level: 22\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : default/armeabi-v7a\n----------\nid: 5 or "android-23"\n Name: Android 6.0\n Type: Platform\n API level: 23\n Revision: 3\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n----------\nid: 6 or "android-24"\n Name: Android 7.0\n Type: Platform\n API level: 24\n Revision: 2\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320\n Tag/ABIs : android-tv/x86, android-wear/armeabi-v7a, android-wear/x86, default/arm64-v8a, default/armeabi-v7a\n----------\nid: 7 or "Google Inc.:Google APIs:22"\n Name: Google APIs\n Type: Add-On\n Vendor: Google Inc.\n Revision: 1\n Description: Android + Google APIs\n Based on Android 5.1.1 (API level 22)\n Libraries:\n * com.android.future.usb.accessory (usb.jar)\n API for USB Accessories\n * com.google.android.media.effects (effects.jar)\n Collection of video effects\n * com.google.android.maps (maps.jar)\n API for Google Maps\n Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n', stderr: '', exitCode: 0 } Available Android targets:

id: 1 or "android-9" Name: Android 2.3.1 Type: Platform API level: 9 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854 Tag/ABIs : default/armeabi

id: 2 or "android-14" Name: Android 4.0 Type: Platform API level: 14 Revision: 4 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800 Tag/ABIs : no ABIs.

id: 3 or "android-21" Name: Android 5.0.1 Type: Platform API level: 21 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : no ABIs.

id: 4 or "android-22" Name: Android 5.1.1 Type: Platform API level: 22 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : default/armeabi-v7a

id: 5 or "android-23" Name: Android 6.0 Type: Platform API level: 23 Revision: 3 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : no ABIs.

id: 6 or "android-24" Name: Android 7.0 Type: Platform API level: 24 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320 Tag/ABIs : android-tv/x86, android-wear/armeabi-v7a, android-wear/x86, default/arm64-v8a, default/armeabi-v7a

id: 7 or "Google Inc.:Google APIs:22" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 1 Description: Android + Google APIs Based on Android 5.1.1 (API level 22) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : no ABIs.

Directories found in /opt/android-sdk-linux/build-tools are 21.1.2, 22.0.1, 23.0.1, 23.0.3, 24.0.1, 24.0.2 Versions found in /opt/android-sdk-linux/build-tools are 21.1.2, 22.0.1, 23.0.1, 23.0.3, 24.0.1, 24.0.2 Selected version is: undefined Selected targetSdk is: 24 Directories found in /opt/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0-alpha1, 24.0.0-alpha2, 24.0.0-beta1, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, maven-metadata.xml, maven-metadata.xml.md5, maven-metadata.xml.sha1 Versions found in /opt/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0, 24.0.0, 24.0.0, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0 Selected version is: 24.2.1 Selected AppCompat version is: 24.2.1 You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=25.0.2'. Run android from your command-line to install required Android Build Tools.

Analytics statuses: { TrackFeatureUsage: 0, TrackExceptions: 0 } Trying to track feature 'DoctorEnvironmentSetup' with value 'incorrect'. Waiting for analytics to send information. Will check in a 1000ms. Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000 Statistics was sent successfully (xhr). There seem to be issues with your configuration.

Issue comes when i run tns with normal user. but works with sudo user. Please help.

jaswantmandloi avatar Feb 05 '17 10:02 jaswantmandloi

[macOS Sierra] I did everything ns documentation says and got the same error. But after i ran command: export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" in terminal - everything works fine.

ipavlyk avatar Feb 21 '17 04:02 ipavlyk

MacOs advanced install document and "magic-install-everything-for-dummies" script both install JAVA_HOME environment variable incorrectly. I fixed it by editing .profile file as suggested in http://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x and entering correct path to Java, as @ipavlyk has suggested in the previous comment.

zmechanic avatar Feb 25 '17 10:02 zmechanic

Use this JAVA version http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html solved this problem for me

nenjack avatar Aug 24 '17 22:08 nenjack

Hello, The problem for me is, i installed everything that the Windows Shell asked me to Install including jdk, android sdk but then when it asked for Installing Android Virtual Device, it m getting an error "The system cannot find the file specified. This script has modified your environment. You need to log off and log back on for the changes to take effect. Press any key to continue..."

Here is the screenshot of what's actually happening - http://prntscr.com/geh733

I tried restarting the shell as it says but still nothing happened.

Please help me. Thanks in Advance!

ghost avatar Aug 29 '17 13:08 ghost

Hi @call-me-mann,

This error is not from the installer itself, but from the installer of the "Hardware_Accelerated_Execution_Manager". You can try locating the %ANDROID_HOME%\extras\intel\Hardware_Accelerated_Execution_Manager\silent_install.bat file and execute it - it will give you the same error.

Hardware_Accelerated_Execution_Manager is not necessary for running emulators, however your emulators will run a lot faster with it. You already downloaded the package you need to install "haxm", so you can follow the instructions here -> https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows .

Hope this helps!

pkoleva avatar Aug 30 '17 07:08 pkoleva