Learning Android Development

Speed up Android Compilation in Apple M1 Device

Make your Android Development Compilation Faster in M1

--

Image by Lukas Gehrer from Pixabay

I have previously written about my first experience with M1 for Android Development and also how to set up Android Emulator for M1.

Now I’m exploring the speed of compilation for the Android Project using the Gradle command line.

The first test

I use two different machines with the same AdoptOpenJDK. The two machines are

  • 2.2 GHz 6-Core Intel Core i7 with 16GB RAM
  • M1 8Core CPU/8Core GPU with 16GB RAM

I run using the same design with 3 different runs, i.e.

  • Assemble the APK
  • Bundle into AAB
  • Running UnitTest

I was expecting M1 MacBook Pro to consume less time. Unfortunately, after running it, the result is below.

The M1 Adopt (x86) is about 1x slower than the Intel i7 Adopt (86) in all tasks! 😩

--

--