Last active
          November 17, 2022 11:35 
        
      - 
      
 - 
        
Save Rofram/7408b0891b3d689e6db6bd4d513e4c0a to your computer and use it in GitHub Desktop.  
Revisions
- 
        
Rofram revised this gist
Mar 17, 2022 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,8 +11,9 @@ wget https://dl.google.com/android/repository/commandlinetools-linux-7302050_lat mkdir -p Android/cmdline-tools unzip commandlinetools-linux-6200805_latest.zip -d Android/cmdline-tools mv Android/cmdline-tools/cmdline-tools Android/cmdline-tools/latest export ANDROID_HOME=$HOME/Android ``` #### Make sure emulator path comes before tools. Had trouble on Ubuntu with emulator from /tools being loaded #### instead of the one from /emulator ```bash  - 
        
Rofram revised this gist
Mar 17, 2022 . 1 changed file with 16 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,23 +6,30 @@ So it looks like unzipping the newest version to ${ANDROID_HOME}/cmdline-tools/c Not sure how this whole forking gists thing is supposed to work but here are the changes I used: https://gist.github.com/jason-s-yu/30375db45c1f71c1259e042d216e4bd3 Go to https://developer.android.com/studio?hl=PL ```bash wget https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip mkdir -p Android/cmdline-tools unzip commandlinetools-linux-6200805_latest.zip -d Android/cmdline-tools mv Android/cmdline-tools/cmdline-tools Android/cmdline-tools/latest ``` export ANDROID_HOME=$HOME/Android #### Make sure emulator path comes before tools. Had trouble on Ubuntu with emulator from /tools being loaded #### instead of the one from /emulator ```bash export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/cmdline-tools/latest:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH" ``` #### don't need this anymore ```bash sdkmanager --sdk_root=${ANDROID_HOME} "tools" ``` ```bash sdkmanager --update sdkmanager --list ``` #### find current version ```bash sdkmanager --list | grep build-tools sdkmanager "build-tools;30.0.3" "platform-tools" "platforms;android-30" "tools" sdkmanager --licenses ```  - 
        
Rofram created this gist
Mar 17, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ The latest version of cmdline tools (7302050_latest) seems to have a different directory structure. The folder is now called cmdline-tools instead of tools so when you extract the folder it won't work as expected. sdkmanager also seems to expect to want to be in ${ANDROID_HOME}/cmdline-tools/latest/bin but extracting it in ANDROID_HOME will just give you ${ANDROID_HOME}/cmdline-tools/bin... So it looks like unzipping the newest version to ${ANDROID_HOME}/cmdline-tools/cmdline-tools will fix this, and remove the need to run sdkmanager --sdk_root.... Easiest way might just be to mkdir -p Android/cmdline-tools and unzip to there & rename the second cmdline-tools to latest Not sure how this whole forking gists thing is supposed to work but here are the changes I used: https://gist.github.com/jason-s-yu/30375db45c1f71c1259e042d216e4bd3 Go to https://developer.android.com/studio?hl=PL wget https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip mkdir -p Android/cmdline-tools unzip commandlinetools-linux-6200805_latest.zip -d Android/cmdline-tools mv Android/cmdline-tools/cmdline-tools Android/cmdline-tools/latest export ANDROID_HOME=$HOME/Android # Make sure emulator path comes before tools. Had trouble on Ubuntu with emulator from /tools being loaded # instead of the one from /emulator export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/cmdline-tools/latest:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH" # don't need this anymore # sdkmanager --sdk_root=${ANDROID_HOME} "tools" sdkmanager --update sdkmanager --list # find current version sdkmanager --list | grep build-tools sdkmanager "build-tools;30.0.3" "platform-tools" "platforms;android-30" "tools" sdkmanager --licenses