79772235

Date: 2025-09-23 05:30:42
Score: 0.5
Natty:
Report link

09-2025

let me start by saying that

IT SHOULD NOT BE THIS DIFFICULT TO SETUP A BUILD ENVIRONMENT FOR ARM64 ON AN ARM64 MACHINE!!!!

sorry... had to get that off my chest. :-)

I just purchased the new Lenovo Chromebook Plus with a MediaTek Kompanio ARM 64 cpul and 16 GB of RAM. Why did I buy this? because every attempt to build an Android app on my 8BG Intel-base Chromebook crashed half way through the build process due to lack of memory resources.... sigh

so, it made perfect sense to get an ARM64 based cpu to do my ARM64 base application development... right? wrong!!!

be, for some reason, there is no officially supported ARM64 version of Android Studio... Why? Why? Why?

ok, seriously... done with my rant.... I have it working and I've documented it all..... it only took 4 days, but here it is... (these instructions assume not previous installations have been attempted. I rebuilt from scratch multiple times to get the cleanest set of instructions that I could)

I've tested this installation/configuration on bookworm and trixie

  1. get the latest static community build of the platform-tools and build-tools
wget -O ~/temp/android-sdk-tools-linux-35.0.2-aarch64.zip \
    https://github.com/lzhiyong/android-sdk-tools/releases/download/35.0.2/android-sdk-tools-static-aarch64.zip
  1. download and install android studio 2025.1.3.7
wget -q -O - \
    https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2025.1.3.7/android-studio-2025.1.3.7-linux.tar.gz \
    | tar -C ~/.local/share -xzvf - \
    --exclude 'android-studio/jbr/*' \
    --exclude 'android-studio/lib/jna/*' \
    --exclude 'android-studio/lib/native/*' \
    --exclude 'android-studio/lib/pty4j/*' 
  1. install the ARM64 binaries from IntelliJ Idea that come as x86_64
wget -q -O - \
    https://download.jetbrains.com/idea/ideaIC-2025.2.2-aarch64.tar.gz \
    | tar -C ~/.local/share/android-studio \
      -xzvf - \
      --wildcards '*/bin/fsnotifier' \
                  '*/bin/restarter' \
                  '*/lib/jna' \
                  '*/lib/native' \
                  '*/lib/pty4j' \
      --strip-components=1
  1. Install the correct jbr java runtime for the aarch64 architecture
wget -q -O - \
    https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_ft-21.0.8-linux-aarch64-b1138.52.tar.gz \
    | tar -C ~/.local/share/android-studio/jbr \
      -xzvf - \
      --strip-components=1
  1. alter the configuration files so that they know to use aarch64 instead of x86_64
mv ~/.local/share/android-studio/bin/studio ~/.local/share/android-studio/bin/studio.do_not_use
sed -i 's/amd64/\$OS_ARCH/' ~/.local/share/android-studio/bin/*.sh
sed -i 's/amd64/aarch64/' ~/.local/share/android-studio/product-info.json
  1. reboot the linux shell and the laptop

    • sudo reboot
    • restart the laptop
  2. launch android studio ~/.local/share/android-studio/bin/studio.sh

  1. back in the terminal, overwrite the platform-tools binaries

rm -rf ~/Android/Sdk/platform-tools/lib64 && unzip ~/temp/android-sdk-tools-linux-35.0.2-aarch64.zip -x build-tools/* -d ~/Android/Sdk/

  1. overwrite the build tools, I'm using v35.0.0, but yours may be different
unzip ~/temp/android-sdk-tools-linux-35.0.2-aarch64.zip -x platform-tools/* -d ~/Android/Sdk/build-tools/36.1.0
mv ~/Android/Sdk/build-tools/36.1.0/build-tools/* ~/Android/Sdk/build-tools/36.1.0
rmdir ~/Android/Sdk/build-tools/36.1.0/build-tools
  1. verify the correct binaries are both show "ARM aarch64"
file ~/Android/Sdk/build-tools/36.1.0/aapt2
  1. in your project, add the following to the gradle.properties file #!!! use full path. it does not appear that parsing of this file accepts shortcuts like $HOME or ~

android.aapt2FromMavenOverride=/home/rhkean/Android/Sdk/build-tools/36.1.0/aapt2

Reasons:
  • Blacklisted phrase (0.5): Why?
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Rob Kean