如何解决React-native错误:也在[:@ react-native-firebase_admob] AndroidManifest.xml:18:13-29
在安装react-native-firebase_admob之后,我将清单文件的值更改为:
<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"/>
,
这是解决方法:
<manifest ... xmlns:tools="http://schemas.android.com/tools">
<application>
...
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-4247389872422093~1957443376"
tools:replace="android:value"/>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。