English 中文(简体)
error: package path is not valid. valid system image paths are:ository... null
原标题:

I have installed the command line tools of android, correctly configured all environment variables.

When I am creating a virtual device with this command:

avdmanager create avd -n test -k "system-images;android-23;google_apis;x86"

It gives the following error:

error: package path is not valid. valid system image paths are:ository... null

I have already installed the SDK tool : sdkmanager "system-images;android-23;google_apis;x86"

And accepted the licenses sdkmanager --licenses

But still it s showing the same error.

By the way, I am using it for react-native

问题回答

In order to resolve your issue, you need to first run the cmd sdkmanager --list. A list will be populated with installed & available modules make sure: you have installed

  1. Build-tools sdkmanager build-tools 30
  2. Platform-tools sdkmanager platform 30
  3. System image sdkmanager "system-images;android-30;google_apis;x86"
  4. System image sdkmanager "system-images;android-30;google_apis;x86_64"

After installing or making sure the above are installed you can go ahead on creating avd.

  1. Create an avd - avdmanager create avd -n TestAVD -k "system-images;android-30;google_apis;x86" --device "Pixel_4"
  2. List created avds emulator -list-avds
  3. Start Emulator or AVD emulator @TestAVD

I ve resolved the issue by installing image first like

sdkmanager --install "system-images;android-23;google_apis;x86"

and then it is possible to create the emulator

It seem that avdmanager can not find the local image. Please try:

  1. cd YOUR_SDK_ROOT_DIRECTORY
  2. avdmanager create avd -n test -k "system-images;android-23;google_apis;x86"

as you can t install windows without windows image or linux without linux image
android AVDs are the same, you need to download the image first then you can install it

to download the image simply type this command in cmd :

sdkmanager "system-images;android-30;google_apis_playstore;x86"

you can change the image name to whatever fit you,

after it finish downloading, now you can install the avd using the command :

avdmanager create avd -n yourAvdName -k "system-images;android-30;google_apis_playstore;x86"




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签