Проблема сборки после добавления библиотеки flutter_email_sender 2.0.0 в приложение Flutter в Android Studio - PullRequest
0 голосов
/ 02 марта 2019

После добавления этой библиотеки в файл pubspec.yaml я больше не могу собрать приложение для Android.

https://pub.dartlang.org/packages/flutter_email_sender#-installing-tab-

Я получаю следующую ошибку:

/Users/duffette/AndroidStudioProjects/undaunted_golf_flutter/android/app/src/main/AndroidManifest.xml:22:18-86 Error:
    Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22: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:15:5-38: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.0.0] AndroidManifest.xml:22: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:15:5-38: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 (help link)

BUILD FAILED in 8s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.


 See (link) for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1

Я уже перенес свой проект в AndroidX.Я удостоверился, что compileSdkVersion 28 и targetSdkVersion 28.

Я успешно добавил другие библиотеки, добавленные в мой проект.

Я пытаюсь следовать инструкциям по добавлению 'tools: replace ="android: appComponentFactory" для элемента <application> на AndroidManifest.xml: 15: 5-38: 19, чтобы переопределить., но я не добился успеха.

...