[英]"Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:12:9-14:91 to override."
I'm trying to compile an Android application that uses react-native and I get:我正在尝试编译一个使用 react-native 的 Android 应用程序,我得到:
/Users/dorianmariefr/src/socializus/react-native/android/app/src/debug/AndroidManifest.xml:14:13-88 Error:
Attribute meta-data#org.unimodules.core.AppLoader#react-native-headless@value value=(org.unimodules.adapters.react.apploader.RNHeadlessAppLoader) from [:unimodules-react-native-adapter] AndroidManifest.xml:14:13-88
is also present at [:expo-modules-core] AndroidManifest.xml:14:13-86 value=(expo.modules.adapters.react.apploader.RNHeadlessAppLoader).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:12:9-14:91 to override.
Seems like I need to merge two values from two librairies:似乎我需要合并来自两个库的两个值:
meta-data#org.unimodules.core.AppLoader#react-native-headless@value
From :unimodules-react-native-adapter
and :expo-modules-core
.来自
:unimodules-react-native-adapter
和:expo-modules-core
。
I'm not sure if I should put org.unimodules.adapters.react.apploader.RNHeadlessAppLoader
or expo.modules.adapters.react.apploader.RNHeadlessAppLoader
and how I should set those values.我不确定是否应该放置
org.unimodules.adapters.react.apploader.RNHeadlessAppLoader
或expo.modules.adapters.react.apploader.RNHeadlessAppLoader
以及我应该如何设置这些值。
How can I do it?我该怎么做?
Edit : Actually I needed to remove the unimodules package and move to the expo package, see https://docs.expo.dev/bare/installing-expo-modules编辑:实际上我需要删除 unimodules 包并移动到 expo 包,请参阅https://docs.expo.dev/bare/installing-expo-modules
This fixed it for me:这为我修复了它:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.social.firebase.example.socializus"
>
...
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme"
>
...
<meta-data
tools:replace="android:value"
android:name="org.unimodules.core.AppLoader#react-native-headless"
android:value="org.unimodules.adapters.react.apploader.RNHeadlessAppLoader"
/>
(now getting a new error though) (虽然现在得到一个新的错误)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.