Nativescript: Error: Package path is not valid. Valid system image paths are:ository... null.

Created on 12 Apr 2018  ยท  4Comments  ยท  Source: NativeScript/NativeScript

Dear friend, we, the rest of the NativeScript community really
appreciate your feedback! While we are doing all we can to take care of every
issue, sometimes we get overwhelmed. Because of that, we will consider issues
that are not constructive or problems that cannot be reproduced "dead".
Additionally, we will treat feature requests or bug reports with unanswered
questions regarding the behavior/reproduction for more than 20 days "dead". All
"dead" issues will get closed.

Please, provide the details below:

I am a relatively new mac user os any help would be appreciated.

After having installed nativescript I am trying to create an emulator. I have used the command:

avdmanager create avd --package "android-25" --name "foo"

and the error I get is:

Error: Package path is not valid. Valid system image paths are:ository...
null.

I can't seem to locate a fix to this problem. Any help?

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes.

Tell us about the problem

Please, ensure your title is less than 63 characters long and starts with a capital
letter.

Check the description earlier.

Which platform(s) does your issue occur on?

iOS/Android/Both

Both.

Please provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it)
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project)
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the
    package.json file of your project)
  • Plugin(s): (look for the version number in the package.json file of your
    project)

tns --version
4.0.0
tns doctor
โœ” Getting environment information

โœ” Your ANDROID_HOME environment variable is set and points to correct directory.
โœ” Your adb from the Android SDK is correctly installed.
โœ” The Android SDK is installed.
โœ” A compatible Android SDK for compilation is found.
โœ” Javac is installed and is configured properly.
โœ” The Java Development Kit (JDK) is installed and is configured properly.
โœ” Xcode is installed and is configured properly.
โœ” xcodeproj is installed and is configured properly.
โœ” CocoaPods are installed.
โœ” CocoaPods update is not required.
โœ” CocoaPods are configured properly.
โœ” Your current CocoaPods version is newer than 1.0.0.
โœ” Python installed and configured correctly.
โœ” The Python 'six' package is found.
No issues were detected.
โœ” Getting NativeScript components versions information...
โœ” Component nativescript has 4.0.0 version and is up to date.
โœ– Component tns-core-modules is not installed.
โœ– Component tns-android is not installed.
โœ– Component tns-ios is not installed.

Please tell us how to recreate the issue in as much detail as possible.

The best approach would be to get your code running in the NativeScript Playground and share the link with us, along with any additional details or steps to reproduce needed for examining the issue there.

It's a command line issue so I am guessing it has something to do with my file system.
Basically when I run:
avdmanager create avd --package "android-25" --name "foo".

The system gives me the error:
Error: Package path is not valid. Valid system image paths are:ository...
null.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

this doesn't work:
avdmanager create avd --package "android-25" --name "foo"

this will also not work:
avdmanager create avd -n test -k "android-25" -c 1000M -f -p ~/.android/avd

Most helpful comment

Thanks @Juliusdz!

This did the trick:

$ cd $ANDROID_HOME/tools/bin

$ ./sdkmanager "system-images;android-25;google_apis;x86"

$ ./sdkmanager --licenses

(I had to accept all licenses)

All 4 comments

5690 You can refer this, as it seems I kinda solved my issues. Give a comment if anything goes wrong - maybe I missed something (I spend all day long installing everything) :)

Thanks @Juliusdz!

This did the trick:

$ cd $ANDROID_HOME/tools/bin

$ ./sdkmanager "system-images;android-25;google_apis;x86"

$ ./sdkmanager --licenses

(I had to accept all licenses)

Yes, I had exact same error. You need to download Android emulator image / package. So I made all steps as in my comment and now it works fine.

p.s. and your command should be avdmanager create avd -n test -k "system-images;android-25;google_apis;x86" as stated in docs

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kn9ts picture kn9ts  ยท  3Comments

dhanalakshmitawwa picture dhanalakshmitawwa  ยท  3Comments

Leo-lay picture Leo-lay  ยท  3Comments

vtisnado picture vtisnado  ยท  3Comments

rLoka picture rLoka  ยท  3Comments