【问题标题】:Need help in compilation of react-native iOS app在编译 react-native iOS 应用程序时需要帮助
【发布时间】:2019-12-03 19:09:47
【问题描述】:

我对 react-native 比较陌生,并尝试编译以前运行的项目但无法编译

我在编译代码时遇到了这个错误。

** 构建失败 **

安装 build/Build/Products/Debug-iphonesimulator/myapp.app 处理命令时遇到错误(域=NSPOSIXErrorDomain,代码=2): 未能安装请求的应用程序 在提供的路径中找不到应用程序包。 提供所需应用程序包的有效路径。 打印:条目,“:CFBundleIdentifier”,不存在

命令失败:/usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist 打印:条目,“:CFBundleIdentifier”,不存在

我已经尝试了下面提到的所有解决方案 Print: Entry, ":CFBundleIdentifier", Does Not Exist

这是我的 package.json 文件

{
    "name": "myapp",
    "version": "0.1.0",
    "private": true,
    "devDependencies": {
        "babel-plugin-module-resolver": "^3.1.1",
        "babel-preset-react-native-stage-0": "^1.0.1",
        "babel-root-slash-import": "^1.1.0",
        "eslint-import-resolver-babel-module": "^4.0.0",
        "eslint-plugin-import": "^2.11.0",
        "jest-react-native": "^18.0.0",
        "jetifier": "^1.6.3",
        "prop-types": "^15.6.1",
        "react-native-dotenv": "^0.1.1",
        "react-test-renderer": "16.2.0"
    },
    "scripts": {
        "start": "react-native start",
        "android": "react-native run-android",
        "ios": "react-native run-ios",
        "test": "node node_modules/jest/bin/jest.js",
        "clean": "react-native-clean-project"
    },
    "jest": {
        "preset": "react-native"
    },
    "dependencies": {
        "moment": "^2.22.0",
        "react": "16.2.0",
        "react-native": "0.52",
        "react-native-clean-project": "^1.0.8",
        "react-native-device-info": "^0.21.5",
        "react-native-document-picker": "^2.1.0",
        "react-native-firebase": "^4.2.0",
        "react-native-htmlview": "^0.12.1",
        "react-native-image-picker": "^0.26.7",
        "react-native-mime-types": "^2.2.1",
        "react-native-network-info": "^3.2.2",
        "react-native-pdf": "^4.0.0",
        "react-native-photo-view": "^1.5.2",
        "react-native-push-notification-ce": "^3.1.3",
        "react-native-swiper": "^1.5.13",
        "react-native-video": "^2.3.1",
        "react-native-video-preview": 
 "git://github.com/chadsmith/react-native-video-preview.git",
        "react-native-video-processing": "^1.13.0",
        "react-navigation": "^1.5.8",
        "rn-fetch-blob": "^0.10.12"
    }
}

【问题讨论】:

标签: react-native


【解决方案1】:

尝试清理构建文件夹并删除清除构建缓存的 DerivedData 文件夹。但主要原因是您没有为应用设置捆绑 ID。假设您点击了链接并确保您拥有一个,那么通常缓存的构建就是问题所在。

【讨论】:

    【解决方案2】:

    我认为有两个可能的原因:

    1) 在某些时候,还有一些其他错误阻止了 JS 包的创建。

    仔细检查构建尝试的整个日志。

    2) 在不正确的路径或使用不正确的index.js 文件生成捆绑包。

    更多信息在这里:

    https://stackoverflow.com/a/57604941/1979861

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-23
      • 2021-12-02
      • 2018-09-01
      • 2017-02-02
      • 1970-01-01
      • 2014-06-25
      • 1970-01-01
      相关资源
      最近更新 更多