开发者

PackageManager has been deprecated

开发者 https://www.devze.com 2022-12-07 19:39 出处:网络
I have a project in flutter that I开发者_StackOverflow社区 developed a few years ago. I have flutter version 2.10.4 installed on my computer. When I want to run the application on my computer, the And

I have a project in flutter that I开发者_StackOverflow社区 developed a few years ago. I have flutter version 2.10.4 installed on my computer. When I want to run the application on my computer, the Android studio console shows me the following message:

/Users/rodrigosanchez/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-2.0.2/android/src/main/java/io/flutter/plugins/androidintent/IntentSender.java:87: warning: [deprecation] resolveActivity(Intent,int) in PackageManager has been deprecated
    return packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null;
                         ^
error: warnings found and -Werror specified
1 error
1 warning

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android_intent: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 9s
Exception: Gradle task assembleDebug failed with exit code 1

I hope you can help me.

Thanks so much for reading.

Run the app on Android device. Thanks


it seem happen because android_intent package is discontinued and replacing by android_intent_plus package. try changing your package and choose the package version that matched to your current SDK version.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号