请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

引入flutter_webview_plugin报错

Launching lib\main.dart on X900 in debug mode…
[!] Your app isn’t using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.
Running Gradle task ‘assembleDebug’…
D:\Flutter\Projects\flutter_trip\flutter_trip\android\app\src\debug\AndroidManifest.xml:22:18-91 Error:
Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.1.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add ‘tools:replace=“android:appComponentFactory”’ to element at AndroidManifest.xml:8:5-29:19 to override.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDebugManifest’.

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.1.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add ‘tools:replace=“android:appComponentFactory”’ to element at AndroidManifest.xml:8:5-29:19 to override.

  • 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 5s
AndroidX incompatibilities may have caused this build to fail. Please migrate your app to AndroidX. See https://goo.gl/CP92wY.
Finished with error: Gradle task assembleDebug failed with exit code 1


以上是报错信息,不知道如何解决

正在回答 回答被采纳积分+3

2回答

CrazyCodeBoy 2020-01-05 21:31:05

你的项目不支持Android x,但你使用了基于Android X的flutter_webview_plugin 插件,所以导致的这个问题;

安装下非Android x版本的flutter_webview_plugin试一下:

dependencies:  
    flutter_webview_plugin: ^0.3.2

可参考下:https://pub.dev/packages/flutter_webview_plugin#033



1 回复 有任何疑惑可以回复我~
提问者 鸡毛哥 2020-01-05 22:34:23

谢谢 我已经通过之前的视频把项目改成支持androidx 了 谢谢

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号