简体   繁体   中英

Android build taken much longer in Macbook Pro with M1 Pro chip using Kotlin 1.6.0

Lately I've been feeling like my Android project was taking way longer to build (around 2 mins, when it used to build in less than a minute for sure). I'm running Android Studio for arm64, with java processes running on Apple Silicon architecture (checked in the Activity Monitor).

In case anyone runs into the same problem, it turns out the slow down occurred after updating to Kotlin 1.6.0 (hence the title of the question). I updated the Kotlin version of my project to the Kotlin plugin version in my Android Studio, which was 1.6.10 and the build time went from 2 mins to 20 seconds, when changes where applied.

I tried to find answer on this question too but my kotlin version is 1.7.0.

What might be wrong:

  1. Adnroid Studio is not for Apple chip(download new one for Apple silicon chip);
  2. Change JDK for ARM(File -> Project Structure -> SDK Location -> JDK Location in the bottom). Example

3. Gradle version is at least 7.0;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM