[英]Error ":app:transformClassesWithDexBuilderForDebug" when upgrade to new version of flutter
I upgrade flutter from v1.91.我从 v1.91 升级了 flutter。 hotfix 6 by using flutter upgrade --force.
使用 flutter upgrade --force 修复修补程序 6。
Then i build an example "layers" - flutter run, it shows this message, while if i switch to 1.91, everything built ok然后我构建了一个示例“层”-flutter run,它会显示此消息,而如果我切换到 1.91,则一切正常
flutter run --stacktrace gives this error
flutter run --stacktrace 给出了这个错误
Could not find an option named "stacktrace".
找不到名为“stacktrace”的选项。
flutter doctor -v颤振医生 -v
G:\\new\\new_exam>flutter doctor -v [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale en-US) • Flutter version 1.12.13+hotfix.5 at G:\\Flutter\\flutter • Framework revision 27321eb (12 days ago), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0
G:\\new\\new_exam>flutter doctor -v [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale en-US) • Flutter version 1.12.13+hotfix .5 在 G:\\Flutter\\flutter • 框架修订版 27321eb(12 天前),2019-12-10 18:15:01 -0800 • 引擎修订版 2994f7e1e6 • Dart 版本 2.7.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at G:\\Flutter\\android • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • ANDROID_HOME = G:\\Flutter\\android • ANDROID_SDK_ROOT = G:\\Flutter\\android\\sdk • Java binary at: G:\\flutter\\openjdk\\bin\\java • Java version OpenJDK Runtime Environment (build 1.8.0_232-b09) • All Android licenses accepted.
[√] Android 工具链 - 为 Android 设备开发(Android SDK 版本 29.0.2) • 位于 G:\\Flutter\\android 的 Android SDK • 未配置 Android NDK 位置(可选;对原生分析支持有用) • 平台 android-29,构建-tools 29.0.2 • ANDROID_HOME = G:\\Flutter\\android • ANDROID_SDK_ROOT = G:\\Flutter\\android\\sdk • Java 二进制文件:G:\\flutter\\openjdk\\bin\\java • Java 版本 OpenJDK 运行时环境(构建 1.8. 0_232-b09) • 接受所有 Android 许可证。
[!] Android Studio (not installed) • Android Studio not found;
[!] Android Studio(未安装) • 未找到Android Studio; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
从https://developer.android.com/studio/index.html下载(或访问https://flutter.dev/setup/#android-setup获取详细说明)。
[!] IntelliJ IDEA Community Edition (version 2019.3) • IntelliJ at C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2019.3.1 X Flutter plugin not installed;
[!] IntelliJ IDEA 社区版(2019.3 版) • IntelliJ at C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2019.3.1 X Flutter 插件未安装; this adds Flutter specific functionality.
这增加了 Flutter 特定的功能。 X Dart plugin not installed;
未安装 X Dart 插件; this adds Dart specific functionality.
这增加了 Dart 特定的功能。 • For information about installing plugins, see https://flutter.dev/intellij-setup/#installing-the-plugins
• 有关安装插件的信息,请参阅https://flutter.dev/intellij-setup/#installing-the-plugins
[!] Connected device !
[!] 连接设备! No devices available
没有可用的设备
!
! Doctor found issues in 3 categories.
医生发现了 3 类问题。
1 : https://i.stack.imgur.com/B4DTX.png
1 : https : //i.stack.imgur.com/B4DTX.png
I feel the solution is pretty straight forward.我觉得解决方案非常简单。 Usually, it's always a best practice to use Android Studio when working with Flutter and Dart.
通常,在使用 Flutter 和 Dart 时使用 Android Studio 始终是最佳实践。 Reasons are there are some dependencies that would require you to use Android Studio to have it work well for you, especially when you're just starting to work with Flutter and Dart.
原因是有些依赖项需要您使用 Android Studio 才能使其适合您,尤其是当您刚开始使用 Flutter 和 Dart 时。
Flutter Doctor is pretty precise as to the issues you're experiencing. Flutter Doctor 对您遇到的问题非常准确。
After downloading Android Studio, do the following;下载Android Studio后,执行以下操作;
Navigate to your Preferences or Android Studio Settings on PC, then select, Plugins, ensure the following plugins are installed.在 PC 上导航到您的首选项或 Android Studio 设置,然后选择插件,确保安装了以下插件。
Among others which would be automatically installed by Android Studio for you, this should take that error away and you should be fine.在 Android Studio 会自动为您安装的其他工具中,这应该可以消除该错误,您应该没问题。
Then, before you probably run your App, if you see the get dependencies at the Top of your Android Studio, click the get dependencies so that Android studio can get the latest dependencies to run your App without issues.然后,在您可能运行您的应用程序之前,如果您在 Android Studio 的顶部看到获取依赖项,请单击获取依赖项,以便 Android Studio 可以获取最新的依赖项以毫无问题地运行您的应用程序。
Ensure you run a cold restart after each time you add a new dependency to your pubspec.yaml file.每次向 pubspec.yaml 文件添加新依赖项后,请确保运行冷重启。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.