简体   繁体   English

&quot;建议:添加 &#39;tools:replace=&quot;android:value&quot;&#39; 到<meta-data> AndroidManifest.xml:12:9-14:91 中的元素来覆盖。”

[英]"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.RNHeadlessAppLoaderexpo.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.

相关问题 添加 &#39;tools:replace=&quot;Android:value&quot;&#39; 到<meta-data> AndroidManifest 中的元素 - add 'tools:replace=“Android:value”' to <meta-data> element at AndroidManifest 将&#39;tools:replace =“ android:label”&#39;添加到 <application> 覆盖AndroidManifest.xml:16:5-39:19的元素 - add 'tools:replace=“android:label”' to <application> element at AndroidManifest.xml:16:5-39:19 to override 没有`<meta-data android:name="flutterEmbedding" android:value="2" /> ` 在 "..\src\main\AndroidManifest.xml" - No `<meta-data android:name="flutterEmbedding" android:value="2"/>` in "..\src\main\AndroidManifest.xml" 清单合并失败了吗?建议:添加&#39;工具:replace =“android:appComponentFactory”&#39;来 <application> AndroidManifest.xml中的元素:8:5-34:19以覆盖 - Manifest merger failed?Suggestion:add'tools:replace=“android:appComponentFactory”'to<application>element at AndroidManifest.xml:8:5-34:19 to overide 工具:replace = android:value to <meta-data> AndroidManisfest.xml:25:5-17:34中的元素覆盖 - tool:replace=android:value to <meta-data> element at AndroidManisfest.xml:25:5-17:34 to override 清单无法解决添加工具:replace="android:value" 到<meta-data>元素</meta-data> - Manifest cannot resolve add tools:replace="android:value" to <meta-data> element 任务“:app:processDebugManifest”执行失败:重复<meta-data /> AndroidManifest.xml 中的元素 - Execution failed for task ':app:processDebugManifest': Dupicate <meta-data/> element in AndroidManifest.xml 华为设备:您应用的AndroidManifest.xml中的元数据标签的值不正确 - Huawei devices: The meta-data tag in your app's AndroidManifest.xml does not have the right value IllegalStateException:您应用的 AndroidManifest.xml 中的元数据标记没有正确的值 - IllegalStateException : The meta-data tag in your app's AndroidManifest.xml does not have the right value AndroidManifest.xml中的元数据标记没有正确的值 - The meta-data tag in AndroidManifest.xml does not have the right value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM