user15281199
user15281199

Reputation:

Warning: Failed to find package 'system-images;android-30;google_apis_playstore;x86 platforms

Im getting the following output when try to install android SDK using sdkmanager cmd-line

 ---------------------------------------
Accept? (y/N): All SDK package licenses accepted

yes: standard output: Broken pipe
Loading package information...                                                  
Loading local repository...                                                     
Info: Parsing legacy package: /opt/android/cmdline-tools
Info: Parsing /opt/android/tools/package.xml
[                                       ] 3% Loading local repository...        
[                                       ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 5% Fetch remote repository...         
[==                                     ] 5% Fetch remote repository...         
[==                                     ] 6% Fetch remote repository...         
[==                                     ] 7% Fetch remote repository...         
[==                                     ] 7% Computing updates...               
[===                                    ] 8% Computing updates...               
Warning: Failed to find package 'system-images;android-30;google_apis_playstore;x86 platforms;android-30 build-tools;31.0.0-rc5 platform-tools emulator'
[===                                    ] 10% Computing updates...              
                                                                                
yes: standard output: Broken pipe
[===                                    ] 10% Computing updates...              
Error: Process completed with exit code 1.

screenshot

Any idea what could be missed?

here is the command that I have used

  mkdir -p /home/runner/.android && touch /home/runner/.android/repositories.cfg
  cd $ANDROID_HOME/cmdline-tools/bin && yes | ./sdkmanager --sdk_root=$ANDROID_HOME --licenses
  cd $ANDROID_HOME/cmdline-tools/bin && yes | ./sdkmanager --sdk_root=$ANDROID_HOME --verbose --no_https "system-images;android-30;google_apis_playstore;x86 platforms;android-30 build-tools;31.0.0-rc5 platform-tools emulator" 

Upvotes: 6

Views: 7999

Answers (3)

shepard _wolf
shepard _wolf

Reputation: 21

Change the ' to " like:

"platforms;android-29"

Full Command:

sdkmanager "platforms;android-29"

i solved my problem with that

Upvotes: 2

Arqam Sultan
Arqam Sultan

Reputation: 1

Solution: Use this command. sdkmanager "system-images;android-31;default;x86_64"

Proved: enter image description here

Root Cause of this issue: Some machine support 64 bit operation thats why that command (sdkmanager "system-images;android-31;default;x86") does not work in that machine.

Upvotes: 0

Denis Oliveira
Denis Oliveira

Reputation: 582

use the sdkmanger to identify the properly package name:

sdkmanager --list

sdkmanager

Another thing split in more then one command:

mkdir -p /home/runner/.android && touch /home/runner/.android/repositories.cfg
pushd $ANDROID_HOME/cmdline-tools/bin
yes | ./sdkmanager --sdk_root=$ANDROID_HOME --licenses
./sdkmanager --sdk_root=$ANDROID_HOME --verbose --channel=0 "system-images;android-30;google_apis_playstore;x86"
./sdkmanager --sdk_root=$ANDROID_HOME --verbose --channel=0 "build-tools;31.0.0"
./sdkmanager --sdk_root=$ANDROID_HOME --verbose --channel=0 "platform-tools"
./sdkmanager --sdk_root=$ANDROID_HOME --verbose --channel=0 "emulator"
popd

Upvotes: 5

Related Questions