android開発をしていて、Epoxyというライブラリを使用しようとしています。
android studioの機能を使ってemptyのプロチェクトを作成したのち、
gradleに以下のdependenciesを記述しました。
def epoxy_version = "3.3.0" implementation "com.airbnb.android:epoxy:${epoxy_version}" implementation "com.airbnb.android:epoxy-databinding:${epoxy_version}" annotationProcessor "com.airbnb.android:epoxy-processor:${epoxy_version}"
すると、以下のようなエラーが出ます。
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.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.
エラーに書いてある通りに、manifestファイルを以下のように書き換えました。
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.test.epoxytutorial" xmlns:tools="http://schemas.android.com/tools"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" tools:replace="android:appComponentFactory"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
すると
java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs
といったようなエラーが出ます。
どうすればEpoxyを使えるようになるんでしょうか?
初期段階から詰まってしまって、、、よろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。