Multiple packages are installed together with Android build-tools package
Asked Answered
V

1

6

I noticed that the CMDL installation of the build-tools package using sdkmanager (version 3.0) installs emulator and platform-tools packages.

sdkmanager --verbose "build-tools;30.0.3"

Info: Preparing "Install SDK Patch Applier v4 (revision: 1)".
Info: "Install SDK Patch Applier v4 (revision: 1)" ready.                       
Info: Installing SDK Patch Applier v4 in /opt/android/patcher/v4                
Info: "Install SDK Patch Applier v4 (revision: 1)" complete.                    
Info: "Install SDK Patch Applier v4 (revision: 1)" finished.                    
Info: Preparing "Install Android Emulator (revision: 30.4.5)".                  
Info: "Install Android Emulator (revision: 30.4.5)" ready.                      
Info: Installing Android Emulator in /opt/android/emulator                      
Info: "Install Android Emulator (revision: 30.4.5)" complete.                   
Info: "Install Android Emulator (revision: 30.4.5)" finished.                   
Info: Preparing "Install Android SDK Platform-Tools (revision: 31.0.0)".        
Info: "Install Android SDK Platform-Tools (revision: 31.0.0)" ready.            
Info: Installing Android SDK Platform-Tools in /opt/android/platform-tools      
Info: "Install Android SDK Platform-Tools (revision: 31.0.0)" complete.         
Info: "Install Android SDK Platform-Tools (revision: 31.0.0)" finished.         
Info: Preparing "Install Android SDK Tools (revision: 26.1.1)".                 
Info: "Install Android SDK Tools (revision: 26.1.1)" ready.                     
Info: Installing Android SDK Tools in /opt/android/tools                        
Info: "Install Android SDK Tools (revision: 26.1.1)" complete.                  
Info: "Install Android SDK Tools (revision: 26.1.1)" finished.                  
Info: Preparing "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)".    
Info: "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" ready.        
Info: Installing Android SDK Build-Tools 30.0.3 in /opt/android/build-tools/30.0.3
Info: "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" complete.     
Info: "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" finished. 

Execution of following command actually ends up with multiple platform-tools installation:

sdkmanager --verbose "platform-tools" "build-tools;30.0.3"

...
Warning: Package "com.android.repository.impl.generated.v1.RemotePackage@5f56a566" (platform-tools) should be installed in "/opt/android/platform-tools" but it already exists. Installing in "/opt/android/platform-tools-2" instead.
...

Do you know about any reason of such behavior and is there any way how to skip emulator package installation?

Velum answered 2/3, 2021 at 16:29 Comment(1)
I have the same issue. Looking at the logs (when run with --verbose) shows "Info: Failed to sort dependencies, returning partially-sorted list." which is probably the cause of the issue. I haven't found a workaround.Cowpea
V
0

Behavior described in my question has been modified (tested with sdkmanager version 7.0):

sdkmanager --verbose "build-tools;33.0.0"

Info: Preparing "Install Android SDK Build-Tools 33 (revision: 33.0.0)".
Info: "Install Android SDK Build-Tools 33 (revision: 33.0.0)" ready.            
Info: Installing Android SDK Build-Tools 33 in /opt/android/build-tools/33.0.0  
Info: "Install Android SDK Build-Tools 33 (revision: 33.0.0)" complete.         
Info: "Install Android SDK Build-Tools 33 (revision: 33.0.0)" finished.

I assume that original problem has been therefore fixed.

Velum answered 7/11, 2022 at 9:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.