在我的应用程序中,当我以调试模式运行应用程序时,一切正常。但是当我使用flutter run --release
运行应用时,会出现此错误,
Gradle task assembleRelease failed with exit code 1
从控制台获取完整日志,
Note: C:\Users\Ravi\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_admob-0.9.0+7\android\src\main\java\io\flutter\plugins\firebaseadmob\AdRequestBuilderFactory.java uses or overrides a deprecated API.
Note: Some input files use or override a deprecated API.
Note: C:\Users\Ravi\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.3.8\android\src\main\java\com\flutter_webview_plugin\WebviewManager.java uses unchecked or unsafe operations.
C:\Users\Ravi\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.4\android\src\main\java\io\flutter\plugins\sharedpreferences\MethodCallHandlerImpl.java:137: warning: [unchecked] unchecked
cast
return (List<String>) stream.readObject();
^
required: List<String>
found: Object
C:\Users\Ravi\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.4\android\src\main\java\io\flutter\plugins\sharedpreferences\MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked
method invocation: constructor <init> in class ArrayList is applied to given types
List<String> listValue = new ArrayList<>((Set) value);
^
required: Collection<? extends E>
found: Set
where E is a type-variable:
E extends Object declared in class ArrayList
C:\Users\Ravi\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.4\android\src\main\java\io\flutter\plugins\sharedpreferences\MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked
conversion
List<String> listValue = new ArrayList<>((Set) value);
^
required: Collection<? extends E>
found: Set
where E is a type-variable:
E extends Object declared in class ArrayList
C:\Users\Ravi\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.4\android\src\main\java\io\flutter\plugins\sharedpreferences\MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked
conversion
List<String> listValue = new ArrayList<>((Set) value);
^
required: List<String>
found: ArrayList
4 warnings
Note: C:\Users\Ravi\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\url_launcher-5.2.5\android\src\main\java\io\flutter\plugins\urllauncher\WebViewActivity.java uses or overrides a deprecated API.
我无法弄清楚,如果某些不赞成使用的API导致此问题,那么为什么它可以在调试模式下工作?请帮助我。