my mac pro is M1 and RAM is 16G, Android Studio version is
Android Studio Arctic Fox | 2020.3.1 Patch 2
Build #AI-203.7717.56.2031.7678000, built on August 27, 2021
Runtime version: 11.0.10+0-b96-7281165 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: Dart, io.flutter, wu.seal.tool.jsontokotlin
someone can tell me why? Every time I sync gradle it takes almost 40mins, make me sick…..
my unityLibrary module’s gradle like follow:
and my dependences:
3
Answers
I’m also using MacBook M1 Pro 16GB ram variant. For me it usually completes around 5 mins. I’m using this version of Android studio
Android Studio Arctic Fox (2020.3.1) Patch 3
. Please install the same and try.Also Gradle builds can take longer time because of slower internet connection. Kindly check the same too.
One cannot mix Android Support with AndroidX Libraries, while for an low-power ARM CPU, this might be "normal" (also on PC notebooks, the performance is sub-optimal, compared to a desktop machine). In order to reduce the build time by +/- 50%, fully migrate to AndroidX and then disable the Jetifier (which is a quite time-consuming Gradle task).
I have also a M1 with 16G and for faster build time you can use Azul JDK.
You can find a very nice Medium tutorial here.
Before this I needed 7 minutes and a half to run all my tests and now with the Azul JDK only 1 minute and a half.
Hope you enjoy.