注意:使用 -Xlint:deprecation 重新编译。注意:某些输入文件使用或覆盖已弃用的 API

Note: Recompile with -Xlint:deprecation. Note: Some input files use or override a deprecated API

当我 运行 flutter run 调试我的代码时 flutter clean 之后它显示了这个错误

Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core-0.7.0\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.16.0+1\android\src\main\java\io\flutter\plugins\firebase\firestore\FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.16.0+1\android\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\TransactionStreamHandler.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.20.1\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details. C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_storage-7.0.0\android\src\main\java\io\flutter\plugins\firebase\storage\FlutterFirebaseStoragePlugin.java:38: warning: [deprecation] Registrar in PluginRegistry has been deprecated public static void registerWith(PluginRegistry.Registrar registrar) { ^ 1 warning Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\google_api_availability-2.0.4\android\src\main\java\com\baseflow\googleapiavailability\GoogleApiAvailabilityPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.5\android\src\main\java\com\baseflow\location_permissions\LocationPermissionsPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.9\android\src\main\java\io\flutter\plugins\googlesignin\GoogleSignInPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider-0.5.0+1\android\src\main\java\io\flutter\plugins\pathprovider\PathProviderPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

但它只显示一次,之后它不再显示任何错误,直到我删除构建 flutter clean。 有什么办法可以消除这个错误吗?或者它是否会导致任何问题,因为我在我的应用程序中还没有看到任何问题。 谢谢

不用太担心。该错误与 Firebase 库有关,它在本机实现中有一些引用已标记为已弃用的 API 的代码。

这不会在您的代码中产生任何问题,他们肯定会在下一版本的库中解决这个问题。

这仅在 flutter clean 之后发生,因为那是编译它并检测到此警告的时刻。之后编译缓存,不再编译