当前位置: 首页 > 知识库问答 >
问题:

Android:添加Firebase消息传递--Menifest合并失败

欧阳何平
2023-03-14
implementation 'com.google.firebase:firebase-messaging:19.0.0'
ERROR: 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:15:5-71:19 to override.
 Manifest merger failed with multiple errors, see logs
Error: tools:replace specified at line:15 for attribute android:appComponentFactory, but no new value specified app main manifest (this file), line 14
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation project(path: ':bluefire-api-v25.5')
    implementation "com.jakewharton:butterknife:8.5.1"
    annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
    implementation 'com.myhexaville:smart-image-picker:1.0.4'
    implementation 'com.github.gcacace:signature-pad:1.2.1'

    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

    implementation 'com.android.support:recyclerview-v7:28.0.0'

    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-messaging:19.0.0'
}

我陷入了死胡同。思想?

共有1个答案

奚飞星
2023-03-14

若要解决问题,请按照以下步骤进行:

>

  • 打开您的AndroidManifest.xml
  • Ide底部有一个名为“合并清单”的选项卡。打开它。
  • 这将在左边列出合并的清单,在右边列出它们的来源。

    当您面临明显的“合并失败”错误时,您将看到一些合并错误。

  •  类似资料:
    • 将Firebase In-App Messaging SDK添加到我的构建后。gradle,在构建我的项目我已经尝试了这里和这里提出的大多数解决方案,但都不适用于我。 下面是我在项目中使用的依赖项库 下面是完整的错误日志

    • 通过日志我得到: 12-02 16:40:57.237 454 2 454 2 E AndroidRuntime:process:com.snowyapps.belajarabc,pid:4542 12-02 16:40:57.237 454 2 454 2 454 2 E AndroidRuntime:java.lang.runtimeException:无法实例化活动ComponentInfo

    • 我必须在SpringJava中为多层架构制作一个RESTAPI,其中需要为Firebase云消息传递(FCM)构建DAO、控制器和服务管理器,以向android应用程序发送推送通知消息,但我无法在Java中配置服务器以向设备发送通知。我怎么能?

    • 我能够在我的AppDelegate中使用此实现在应用中接收FCM令牌: 这很奇怪,因为我之前已经在另一个iOS应用程序上实现了FCM(虽然不太复杂),我检查了设置是否一致。 唯一的区别是这个应用程序有几个目标。 如果我得到FCM令牌,APN和Firebase之间的配置是否正确?我还可以尝试调试什么? 更新:我使用了一个curl来发送通知(如本文所述:https://firebase.googleb

    • FCM服务未向我的iOS应用程序发送消息。 > App CAN成功接收APNs令牌和实例ID令牌 App CAN使用推送通知实用程序利用. p8令牌在后台成功接收来自APN的推送 #2中使用的相同APNs密钥上传到Firebase控制台 应用程序无法接收Firebase控制台中Notification Composer发送的消息,也无法使用CURL请求接收消息。 应用程序在通过FCM发送时不显示任

    • 我正试图将FCM与SNS整合。我在这个答案中读到设置应该与GCM相同。我设法创建了一个FCM应用程序,可以向android设备发送消息。当应用程序在后台时,设备在托盘中接收通知,或当应用程序在前台时打印接收的消息。我正试图整合它现在到SNS,但我似乎不能使它工作,没有任何错误信息。