【发布时间】:2021-01-22 04:24:29
【问题描述】:
我在我的设备上测试发布版本时遇到问题。如果我使用flutter run 或flutter run --release 使用该应用程序,则该应用程序运行时不会报告任何错误,我可以毫无问题地使用该应用程序。但是,使用从flutter build apk 生成的 APK,应用程序立即崩溃,说明应用程序无法启动。
我已经从这里https://flutter.dev/docs/deployment/android#building-the-app-for-release 关注了所有内容,所以这不应该是问题。
如何开始调试这个问题?
这是 Flutter Doctor -v 的输出
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.7 19H2, locale en-GB)
• Flutter version 1.20.4 at /Users/student/flutter
• Framework revision fba99f6cf9 (3 weeks ago), 2020-09-14 15:32:52 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/student/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.1
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.49.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.15.0
【问题讨论】:
-
你有解决办法吗?