ios 多个命令在Xcode 12上生成并React为原生

sz81bmfz  于 2023-05-19  发布在  iOS
关注(0)|答案(9)|浏览(158)

我试图建立和存档的iOS应用程序。但是我得到了下面的错误。我在StackOverflow和谷歌上搜索了一下,但我的错误有点不同,我无法理解。如果有人能帮助我,那就太好了。

具体错误:

Multiple commands produce 
'/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
1) Target 'React-Core-60309c9c-AccessibilityResources' has create directory command with output '/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
2) Target 'React-Core-AccessibilityResources' has create directory command with output '/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'

我使用的依赖项:

"dependencies": {
"@react-native-async-storage/async-storage": "^1.14.1",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-cookies/cookies": "^6.0.4",
"@react-navigation/drawer": "^5.12.3",
"@react-navigation/native": "^5.9.2",
"@react-navigation/stack": "^5.14.2",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-gesture-handler": "^1.9.0",
"react-native-image-slider-box": "^1.0.12",
"react-native-ionicons": "^4.6.5",
"react-native-paper": "^3.6.0",
"react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.17.1",
"react-native-tableview-simple": "^4.2.1",
"react-native-vector-icons": "^8.0.0",
"react-native-webview": "^11.2.1",
"rn-webview": "^0.1.0"

},

iOS Xcode Build Settings截图如下:

我的POD文件:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

platform :ios, '10.0'

target 'Globallove' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

#target 'GloballoveTests' do
#inherit! :complete
# Pods for testing
#end

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!({ 'Flipper' => '0.74.0' })
post_install do |installer|
flipper_post_install(installer)

installer.pods_project.targets.each do |target|
 if target.name == "React-Core.common-AccessibilityResources"
  target.remove_from_project
 end
end
end
end
ckx4rj1h

ckx4rj1h1#

在我的例子中,它应该是React-Core-AccessibilityResources,我用下面的代码更新了我的pod文件:

use_flipper!({ 'Flipper' => '0.74.0' })
 post_install do |installer|
  flipper_post_install(installer)

  installer.pods_project.targets.each do |target|
  if target.name == "React-Core-AccessibilityResources"
   target.remove_from_project
  end
 end
end
end

然后运行pod install

zphenhs4

zphenhs42#

我也面临着类似的问题,请尝试下面提到的指令来解决您的问题。可能对你有帮助。
从Xcode Pods文件夹中删除React-Core.common-AccessibilityResources。完成此代码后,在项目中执行pod install命令。在构建之前还要清除派生数据

ckx4rj1h

ckx4rj1h3#

我也遇到了同样的问题,我通过在Build Phases/Copy Bundle Resources中删除fonts.ttf文件来解决它。此外,如果有重复的文件,请删除CBR中的所有重复文件。

gpfsuwkq

gpfsuwkq4#

我在使用react-native 0.64.1时也遇到了同样的问题,我设法通过将构建系统切换到Legacy来解决这个问题。
文件>工作区设置>生成系统>旧版生成系统

3xiyfsfu

3xiyfsfu5#

1.打开您的xCode
1.选择pod文件夹
1.查找或搜索React-Core.common-AccessibilityResources
1.从pod中取出
最后重建你的项目。

g2ieeal7

g2ieeal76#

多个命令produce是React Native中的常见错误。主要是由于图标和字体。因此,为了解决这个问题,我们需要从Xcode中的复制包资源中删除项目。Click to check image
步骤1.打开Xcode步骤2.检查错误。您会发现错误计数与复制包资源中的字体计数相同。因此,请删除那里的字体,并仅在Xcode中运行代码。
快乐学习

g6baxovj

g6baxovj7#

错误只是说一些Pod重复,仔细检查所有Pod并删除重复的Pod👍🏻

ni65a41a

ni65a41a8#

我们得到这个错误是因为有人在我们的podfile顶部粘了一个pod,而它应该在目标内部:
目标'x'执行#...
pod 'Permission-FaceID',:path =>“#{permissions_path}/FaceID”

安装后执行|安装程序|#...结束结束

eqzww0vc

eqzww0vc9#

1.在Xcode中打开项目
1.查找pod:command+shift+f -> AccessibilityResources
1.移至选项卡签名和功能
1.选择您的团队x1c 0d1x

相关问题