简体   繁体   English

注册商已弃用。 在 Java 中弃用

[英]Registrar is deprecated. Deprecated in Java

I'm getting this warning: 'Registrar' is deprecated.我收到此警告:“注册商”已弃用。 Deprecated in Java' any time I run flutter build apk.每当我运行 flutter 构建 apk 时,在 Java 中已弃用。 This is the error dialogue in android studio: :\Users\df\Desktop\flutter.pub-cache\hosted\pub.dartlang.org\app_settings-4.2.0\android\src\main\kotlin\com\example\appsettings\AppSettingsPlugin.kt:16:48: warning: 'Registrar' is deprecated.这是 android studio 中的错误对话框: :\Users\df\Desktop\flutter.pub-cache\hosted\pub.dartlang.org\app_settings-4.2.0\android\src\main\kotlin\com\example\appsettings \AppSettingsPlugin.kt:16:48: 警告:“注册商”已弃用。 Deprecated in Java import io.flutter.plugin.common.PluginRegistry.Registrar ^在 Java 中弃用 import io.flutter.plugin.common.PluginRegistry.Registrar ^

I run flutter build apk and this error always pop up我运行 flutter 构建 apk,这个错误总是弹出

The warning you're seeing is indicating that the class 'Registrar' is deprecated in the app_settings library you're using (version 4.2.0).您看到的警告表明您正在使用的 app_settings 库(版本 4.2.0)中已弃用 class 'Registrar'。 This means that the class is no longer recommended for use and may be removed in a future version.这意味着不再推荐使用 class,可能会在以后的版本中删除。

This class is part of the Flutter plugin system and is used to register plugins with the Flutter engine.这个 class 是 Flutter 插件系统的一部分,用于向 Flutter 引擎注册插件。 In the latest versions of Flutter, the plugin registration process has been updated and the Registrar class is no longer needed.最新版本Flutter更新了插件注册流程,不再需要Registrar class。

To resolve this warning, you can try updating to a newer version of the app_settings library that does not use the deprecated Registrar class. You can check the latest version of the library on the pub.dev website.要解决此警告,您可以尝试更新到更新版本的 app_settings 库,该库不使用已弃用的 Registrar class。您可以在 pub.dev 网站上查看该库的最新版本。

Alternatively, you can try using a different library that provides similar functionality and is compatible with the latest version of Flutter.或者,您可以尝试使用提供类似功能并与最新版本 Flutter 兼容的其他库。

It's also good to check that your app's dependencies are up-to-date and that you have the latest version of the Android Studio and all the necessary dependencies installed.检查您的应用程序的依赖项是否是最新的以及您是否安装了最新版本的 Android Studio 和所有必要的依赖项也是很好的。

You can also try cleaning and rebuilding the project and running the app on different emulators or devices to see if the issue is specific to the device you are currently testing on.您还可以尝试清理和重建项目并在不同的模拟器或设备上运行该应用程序,以查看问题是否特定于您当前正在测试的设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 默认显示的吸气剂:显示。 已弃用。 在 Java 中已弃用 - Getter for defaultDisplay: Display!' is deprecated. Deprecated in Java 如何处理`已弃用。 在 Java 中弃用? - How to handle `is deprecated. Deprecated in Java`? 'setHasOptionsMenu(Boolean): Unit' 已弃用。 在 Java 中已弃用 - 'setHasOptionsMenu(Boolean): Unit' is deprecated. Deprecated in Java 不推荐使用“ViewModelProviders”。 Java解决方案? - 'ViewModelProviders' is deprecated. Java solution? '签名:数组&lt;(out)签名。&gt;!' 已弃用。 在 Java 中已弃用 - 'signatures: Array<(out) Signature!>!' is deprecated. Deprecated in Java 'onPrepareOptionsPanel(View?, Menu): Boolean' 已弃用。 在 Java 中已弃用 - 'onPrepareOptionsPanel(View?, Menu): Boolean' is deprecated. Deprecated in Java 不推荐使用AppInviteReferral。 还有其他选择吗? - AppInviteReferral is deprecated. Is there an alternative? WifiManager startScan 已弃用。 选择? - WifiManager startScan deprecated. Alternative? setRetainInstance 已弃用。 什么是备选? - setRetainInstance is deprecated. What is alternative? isMinifyEnabled()已弃用。 有什么选择? - isMinifyEnabled() is deprecated. What is the alternative?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM