crash - 为什么升级到 Flutter v0.7.3 beta 会阻止我的应用程序运行?

标签 crash flutter upgrade

我已将 Flutter 版本从 0.5.1 beta 升级到 0.7.3 beta,因为少数插件无法正常工作,建议我升级到最新版本,包括插件和 Flutter 本身。但是,这完全破坏了应用程序,因为它甚至无法启动。下面是 Android Studio 运行控制台输出

Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.20/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.20/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuth.Plugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-1.0.2/android/src/main/java/io/flutter/plugins/firebase/storage/FirebaseStoragePlugin.java:293: warning: [unchecked] unchecked cast
Map<String, String> customMetadata = (Map<String, String>) map.get("customMetadata");
                                                                  ^
  required: Map<String,String>
  found:    Object
1 warning
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_multiple-0.0.2/android/src/main/java/com/ruiyu/imagepickermultiple/TransparentActivity.java uses unchecked or unsafe operations.`
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.5/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Built build/app/outputs/apk/debug/app-debug.apk.
Finished with error: NoSuchMethodError: The method 'allElements' was called on null.
Receiver: null
Tried calling: allElements("activity")

以下是 flutter 医生的输出
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.7.3, on Mac OS X 10.13.6 17G65, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.0)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.1)
[✓] Connected devices (1 available)

! Doctor found issues in 1 category.
Process finished with exit code 0

我确信 allElements() 不是飞镖或 flutter 代码。它是 Java 内部代码,意味着插件或 Flutter 本身已损坏。

最佳答案

我感到非常尴尬,因为这是我自己的行为导致了这个问题。我终于通过转到Android list 文件来修复它并删除了有问题的

tools:replace="android:label"

出于某种我不知道的原因,我将其放入标签中。那我就..
flutter clean

然后运行应用程序工作!瞧!

关于crash - 为什么升级到 Flutter v0.7.3 beta 会阻止我的应用程序运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52353221/

相关文章:

ios - 踩在 block 处理程序的 "EXC_BAD_ACCESS KERN_INVALID_ADDRESS"上

dart - 将 FloatingActionButton 放在左侧

android - flutter 任务 ':app:checkDebugAarMetadata' 执行失败

mysql - 将WSO2物联网服务器3.1.0升级到3.3.0

javascript - 如何使用 jQuery 进行 "tiny release"升级?

iphone - 来自设备的 dSYM 文件

C++ Mex 文件在 64 位 linux 上使 matlab 崩溃,但在 32 位 Windows 上不会,但程序在 Matlab 外运行良好

python - makemigrations 在 Django 1.9 中因 django_enumfield 失败

windows - 使用 IF 批量过滤多个结果

android - Flutter video_player 无法在一个页面加载多个视频