FlutterTaoBaoKe / flutter_alibc

flutter版本的阿里百川插件
MIT License
125 stars 46 forks source link

集成报错 #65

Closed Tyrone2333 closed 4 years ago

Tyrone2333 commented 4 years ago
E:\enzo\code\flutter\flutter_alibc\example\android\app\src\debug\AndroidManifest.xml:24:18-86 Error:
    Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.1.0] AndroidManifest.xml:24:18-86
    is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:10:5-35: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=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.1.0] AndroidManifest.xml:24:18-86
    is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:10:5-35: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 1m 55s
AndroidX incompatibilities may have caused this build to fail. Please migrate your app to AndroidX. See https://goo.gl/CP92wY.
Exception: Gradle task assembleDebug failed with exit code 1

环境:

[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.19041.264], locale zh-CN)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[√] Android Studio (version 3.6)
[!] VS Code (version 1.45.1)
    X Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (1 available)
Tyrone2333 commented 4 years ago

修改android目录下AndroidManifest.xml文件,增加内容: xmlns:tools="http://schemas.android.com/tools" tools:replace="android:label"

    <manifest
        xmlns:tools="http://schemas.android.com/tools">
        <application
            tools:replace="android:label">
    ...