【发布时间】:2018-04-11 17:10:47
【问题描述】:
我正在尝试让 react-native-maps 工作。我已按照这些说明进行操作 react-native-maps 但在运行 react-native run-ios 时出现错误,并且不知道是什么原因造成的。
package.json
{
"name": "mobile",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"axios": "^0.18.0",
"i": "^0.3.6",
"npm": "^5.8.0",
"prop-types": "^15.6.1",
"react": "16.3.1",
"react-native": "0.55.1",
"react-native-drawer": "^2.5.0",
"react-native-elements": "^0.19.1",
"react-native-maps": "^0.21.0",
"react-native-material-ui": "^1.22.1",
"react-native-router-flux": "^4.0.0-beta.28",
"react-native-sidebar": "^0.3.0",
"react-native-vector-icons": "^4.6.0",
"react-redux": "^5.0.7",
"redux": "^3.7.2"
},
"devDependencies": {
"babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1",
"eslint-config-rallycoding": "^3.2.0"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./assets/fonts"
]
}
}
错误如下所示:
以下构建命令失败:
编译C build/Build/Intermediates.noindex/mobile.build/Debug-iphonesimulator/mobile.build/Objects-normal/x86_64/AppDelegate.o mobile/AppDelegate.m 正常 x86_64 目标-c com.apple.compilers.llvm.clang.1_0.compiler(1次失败)
安装 build/Build/Products/Debug-iphonesimulator/mobile.app 一个 处理命令时遇到错误(域=IXErrorDomain, code=13): 无法从 /Users/danieltuttle/project/code/frontend/traveler-mobile/ios/build/Build/Products/Debug-iphonesimulator/mobile.app 打印:条目,“:CFBundleIdentifier”,不存在
命令失败:/usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/mobile.app/Info.plist 打印:条目,“:CFBundleIdentifier”,不存在
当我查看 mobile.app 文件夹时。我看到那里什么都没有。没有 Info.plist。没有。因为这是构建文件夹,所以似乎应该创建它。我必须在那里设置吗?
有人可以给点提示如何解决这个问题吗?谢谢!
【问题讨论】:
-
确保在 info.plist 中添加了
CFBundleIdentifier -
CFBundleIdentifier 键存在于 info.plist 中
-
它是否有与键关联的字符串?
-
我更新了这个问题。抱歉,我之前查看了错误的 info.plist。
-
至少添加安装
react-native-maps和package.json文件的步骤。CFBundleIdentifier错误的出现可能有很多不同的原因,所以仅仅这个错误就会导致人们提出许多有效的可能解决方案,但这一切都只是在黑暗中拍摄。
标签: react-native react-native-maps