【问题标题】:Android build taken much longer in Macbook Pro with M1 Pro chip using Kotlin 1.6.0Android build taken much longer in Macbook Pro with M1 Pro chip using Kotlin 1.6.0
【发布时间】:2022-12-01 15:45:27
【问题描述】:

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).

【问题讨论】:

    标签: android android-studio kotlin apple-m1


    【解决方案1】:

    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.

    【讨论】:

    • Thank you so much. My build time is 5min(even 1 line change) -> 1min
    【解决方案2】:

    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;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-02-20
      • 2023-02-17
      • 1970-01-01
      • 1970-01-01
      • 2021-03-24
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多