解决:React Native Android构建重复错误

问题描述

将我的android应用程序与Android Studio捆绑在一起时(使用react native)时出现问题。它显示了以下错误

[string/CodePushDeploymentKey] /Users/{user}/{app}/android/app/src/main/res/values/strings.xml  
[string/CodePushDeploymentKey] /Users/{user}/{app}/android/app/build/generated/res/resValues/release/values/gradleResValues.xml: Error: Duplicate resources

我的strings.xml文件看起来很正常:

<resources>
    <string name="app_name">{appname}</string>
    <string name="appCenterCrashes_whenToSendCrashes" moduleConfig="true" translatable="false">DO_NOT_ASK_JAVASCRIPT</string>
    <string name="appCenteranalytics_whenToEnableAnalytics" moduleConfig="true" translatable="false">ALWAYS_SEND</string>
    <string moduleConfig="true" name="CodePushDeploymentKey">KEY</string>
</resources>

非常感谢您的帮助!

编辑: 我解决了问题。我使用了多阶段密钥,并且需要删除strings.xml中的codepushdeployment行

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)