gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 17:04:07 26 4
gpt4 key购买 nike

我已将 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com