0

我有一个相当大的应用程序,在 Flutter 2 之前为 android 构建需要大约 8 -10 分钟,因为升级构建时间变得非常长。正如主题所述,我试图弄清楚如何弄清楚为什么会发生这种情况。

从我疯狂的构建时间之一记录下来 https://gist.github.com/glenfordwilliams/f95d75f82a5f7bb1de7d95dddd8859e3

扑医生

[✓] Flutter (Channel stable, 2.0.2, on Linux, locale en_US.UTF-8)
⢿^C[kingwill101@kingtech ~]$ flutter doctor -v
[✓] Flutter (Channel stable, 2.0.2, on Linux, locale en_US.UTF-8)
    • Flutter version 2.0.2 at /opt/flutter
    • Framework revision 8962f6dc68 (4 days ago), 2021-03-11 13:22:20 -0800
    • Engine revision 5d8bf811b3
    • Dart version 2.12.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/kingwill101/Android/Sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 15.0.2+7)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 11.1.0
    • cmake version 3.19.6
    • ninja version 1.10.2
    • pkg-config version 1.7.3

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at /usr/share/idea
    • Flutter plugin version 54.0.3
    • Dart plugin version 203.7759

[✓] Connected device (2 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
    • Linux (desktop)         • linux         • linux-x64   • Linux

! Doctor found issues in 2 categories.
4

1 回答 1

-1

这是由您的互联网连接速度引起的,因为 gradle build 需要互联网加上您的计算机的速度也很重要。

于 2021-03-15T19:30:43.723 回答