在构建我的颤振项目时,我得到了以下错误:
/home/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/move_to_background-1.0.2/android/src/main/java/com/sayegh/move_to_background/MoveToBackgroundPlugin.java:13: warning: [deprecation] Registrar in PluginRegistry has been deprecated
import io.flutter.plugin.common.PluginRegistry.Registrar;
^
/home/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/move_to_background-1.0.2/android/src/main/java/com/sayegh/move_to_background/MoveToBackgroundPlugin.java:24: warning: [deprecation] Registrar in PluginRegistry has been deprecated
public static void registerWith(Registrar registrar) {
^
2 warnings
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file not set for signing config release
* 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 48s
Running Gradle task 'assembleRelease'... 49.6s
Gradle task assembleRelease failed with exit code 1
如果它与插件move_to_background有关,我使用move_to_background: ^1.0.2
版本,我更改了版本,但没有工作
发布于 2022-09-13 15:31:34
因此,首先,我建议使用该软件包的最新版本。
第二点是,为了发布应用程序(在发布模式下构建),你必须在应用程序上签名,这样谷歌才能知道应用程序属于你。
查看有关如何在应用程序上签名并将其发布到Google:https://www.youtube.com/watch?v=g0GNuoCOtaQ的教程
https://stackoverflow.com/questions/73705579
复制相似问题