gpt4 book ai didi

分支更改后 Flutter 应用程序崩溃

转载 作者:行者123 更新时间:2023-12-05 04:26:44 24 4
gpt4 key购买 nike

我们昨天更改了分支,但应用程序未在新分支上运行。它给我一个错误:

Launching lib/main.dart on Redmi Note 9 Pro in debug mode...
/home/aman/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-8.3.0/android/src/main/java/com/baseflow/permissionhandler/ServiceManager.java:75: warning: [deprecation] queryIntentActivities(Intent,int) in PackageManager has been deprecated
List<ResolveInfo> callAppsList = pm.queryIntentActivities(callIntent, 0);
^
error: warnings found and -Werror specified
/home/aman/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-8.3.0/android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java:317: warning: [deprecation] getPackageInfo(String,int) in PackageManager has been deprecated
.getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS);
^
1 error
2 warnings

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':permission_handler:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 5s
Running Gradle task 'assembleDebug'... 66.7s
Exception: Gradle task assembleDebug failed with exit code 1

我不认为分支变更有任何问题。我不知道它在说什么。

最佳答案

它声明您的权限处理程序正在使用已弃用的包。如果您使用的是旧版本的 flutter,请将 pubspec 中的权限处理程序升级到 9.0.0,或者如果您使用的是 flutter 3+,请使用最新版本并重试。作为第一次尝试,您可以将 pubspec 中权限处理程序的版本更改为任何

permission_handler: any

尝试一下是否可行

关于分支更改后 Flutter 应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72961123/

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