android - react native 错误 : is also present at [:@react-native-firebase_admob] AndroidManifest. xml:18:13-29

标签 android firebase react-native admob firebase-admob

安装 react-native-firebase_admob 后,我更改了 list 文件的值:

 <application>
   ******
   <meta-data  android:name="com.google.android.gms.ads.APPLICATION_ID"
                android:value="ca-app-pub-4247389872422093~1957443376"/>

然后我得到这个错误:

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : 
           Attribute meta-data#com.google.android.gms.ads.APPLICATION_ID@value
           value=(ca-app-pub-4247389872422023~1957443376)
           from AndroidManifest.xml:30:78-132

is also present at
           [:@react-native-firebase_admob] AndroidManifest.xml:18:13-29
           value=().

Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:30:9-134
to override.

最佳答案

只听从建议。


<application>
   ******
<meta-data  android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-4247389872422093~1957443376"
            tools:replace="android:value"/>

关于android - react native 错误 : is also present at [:@react-native-firebase_admob] AndroidManifest. xml:18:13-29,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63413557/

相关文章:

php - Microsoft Azure 通知错误 : 404 No service is hosted at the specified address

ios - 没有这样的模块 'FIRStorageMetadata'

react-native - 如何在 React Native 中使用配置变量

javascript - 嵌套文本,垂直对齐不起作用 - React Native

android studio - 将 firebase-ui 0.6.0 升级到 2.3.0 或最新版本

javascript - 循环中的 react-native-maps 标记未呈现

android - kotlin android - 带有 Builder 模式和 Java 8 lambda 的自定义对话框

android - 返回 Activity 时为空指针

android - 获取 Canvas 的一部分作为位图

swift - 安装用于 firebase 的 cocoapods 挂起并卡住