问题描述
我已将Flutter升级到1.12.13 + hotfix.5,此后出现错误未支持的Android插件版本:3.5.3.
I have upgraded the flutter to 1.12.13+hotfix.5 and after that I am getting the error Unsuported Android Plugin version: 3.5.3.
当我将gradle版本降级到3.5.2、3.5.1、3.5.0+时,它显示以下错误:
When I downgrade the gradle build to 3.5.2, 3.5.1, 3.5.0+, it shows below error:
下面是扑医生结果的屏幕截图:
Below is the screenshot of flutter doctor result:
在控制台中获得以下警告
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
注意:C:\ Users \ TiwariA \ AppData \ Roaming \ Pub \ Cache \ hosted \ pub.dartlang.org \ device_info-0.4.1 + 4 \ android \ src \ main \ java \ io \ flutter \ plugins \ deviceinfo \ DeviceInfoPlugin.java使用或覆盖已弃用的API.
Note: C:\Users\TiwariA\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\device_info-0.4.1+4\android\src\main\java\io\flutter\plugins\deviceinfo\DeviceInfoPlugin.java uses or overrides a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
注意:C:\ Users \ TiwariA \ AppData \ Roaming \ Pub \ Cache \ hosted \ pub.dartlang.org \ firebase_core-0.4.3 + 1 \ android \ src \ main \ java \ io \ flutter \ plugins \ firebase \ core \ FirebaseCorePlugin.java使用或覆盖已弃用的API.
Note: C:\Users\TiwariA\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_core-0.4.3+1\android\src\main\java\io\flutter\plugins\firebase\core\FirebaseCorePlugin.java uses or overrides a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
注意:某些输入文件使用或覆盖不推荐使用的API.
Note: Some input files use or override a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
注意:C:\ Users \ TiwariA \ AppData \ Roaming \ Pub \ Cache \ hosted \ pub.dartlang.org \ cloud_firestore-0.13.0 + 1 \ android \ src \ main \ java \ io \ flutter \ plugins \ firebase \ cloudfirestore \ CloudFirestorePlugin.java使用未经检查或不安全的操作.
Note: C:\Users\TiwariA\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.13.0+1\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses unchecked or unsafe operations.
注意:使用-Xlint:进行重新编译:未经检查以获取详细信息.
Note: Recompile with -Xlint:unchecked for details.
注意:C:\ Users \ TiwariA \ AppData \ Roaming \ Pub \ Cache \ hosted \ pub.dartlang.org \ firebase_messaging-6.0.9 \ android \ src \ main \ java \ io \ flutter \ plugins \ firebasemessaging \ FirebaseMessagingPlugin.java使用或覆盖已弃用的API.
Note: C:\Users\TiwariA\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-6.0.9\android\src\main\java\io\flutter\plugins\firebasemessaging\FirebaseMessagingPlugin.java uses or overrides a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
注意:某些输入文件使用未经检查或不安全的操作.
Note: Some input files use unchecked or unsafe operations.
注意:使用-Xlint:进行重新编译:未经检查以获取详细信息.
Note: Recompile with -Xlint:unchecked for details.
注意:某些输入文件使用或覆盖不推荐使用的API.
Note: Some input files use or override a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
注意:某些输入文件使用未经检查或不安全的操作.
Note: Some input files use unchecked or unsafe operations.
注意:使用-Xlint:进行重新编译:未经检查以获取详细信息.
Note: Recompile with -Xlint:unchecked for details.
注意:C:\ Users \ TiwariA \ AppData \ Roaming \ Pub \ Cache \ hosted \ pub.dartlang.org \ path_provider-1.5.1 \ android \ src \ main \ java \ io \ flutter \ plugins \ pathprovider \ PathProviderPlugin.java使用或覆盖已弃用的API.
Note: C:\Users\TiwariA\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\path_provider-1.5.1\android\src\main\java\io\flutter\plugins\pathprovider\PathProviderPlugin.java uses or overrides a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译. C:\ Users \ TiwariA \ AppData \ Roaming \ Pub \ Cache \ hosted \ pub.dartlang.org \ shared_preferences-0.5.6 \ android \ src \ main \ java \ io \ flutter \ plugins \ sharedpreferences \ SharedPreferencesPlugin.java:25 :警告:FlutterPluginBinding中的[deprecation] getFlutterEngine()已被弃用 setupChannel(binding.getFlutterEngine().getDartExecutor(),binding.getApplicationContext()); ^ 1警告 注意:某些输入文件使用或覆盖不推荐使用的API.
Note: Recompile with -Xlint:deprecation for details. C:\Users\TiwariA\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.6\android\src\main\java\io\flutter\plugins\sharedpreferences\SharedPreferencesPlugin.java:25: warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext()); ^ 1 warning Note: Some input files use or override a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
注意:某些输入文件使用或覆盖不推荐使用的API.
Note: Some input files use or override a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
完成错误:Unsuported Android插件版本:3.5.3
Finished with error: Unsuported Android Plugin version: 3.5.3.
推荐答案
我遇到了同样的问题.
这很奇怪,但这是因为如果在我的app/build.gradle
中定义productFlavors而不将--flavor
传递给flutter run
. (例如flutter run --flavor myApp
It is weired but it was because if define productFlavors in my app/build.gradle
and not passing --flavor
to flutter run
. (eg. flutter run --flavor myApp
添加后对我有用...
After adding it it worked for me...
这篇关于非支持的Android插件版本:3.5.3.升级flutter 1.12.13 + hotfix.5之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!