【问题标题】:SDK 32.0.0 is not valid SDKSDK 32.0.0 不是有效的 SDK
【发布时间】:2019-09-23 10:30:23
【问题描述】:

我的应用程序是在 sdk 32.0.0 中构建的,以前它工作正常,但如果我将应用程序升级到 33.0.0,它会给我错误,因此面临许多问题,例如无法加载节点模块或本地化。请帮助我如何使用当前版本运行应用程序

package.json

{
  "name": "Atcatat",
  "version": "1.2.3",
  "description": "Ecommerce Store",
  "author": "HamzaNisar",
  "private": true,
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "setup": "./scripts/setup.sh",
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "api-ecommerce": "0.0.16",
    "axios": "^0.18.0",
    "babel-preset-env": "^1.7.0",
    "base-64": "^0.1.0",
    "currency-formatter": "1.5.3",
    "expo": "^32.0.0",
    "expo-analytics": "^1.0.7",
    "expokit": "1.7.1",
    "firebase": "5.8.1",
    "html-entities": "^1.2.1",
    "lodash": "^4.17.15",
    "moment": "2.24.0",
    "monet": "0.9.0",
    "oauth-1.0a": "1.0.1",
    "path": "^0.12.7",
    "react": "16.5.0",
    "react-instantsearch": "5.3.2",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-animatable": "1.3.1",
    "react-native-app-intro-slider": "1.0.1",
    "react-native-button": "^2.3.0",
    "react-native-check-box": "2.1.7",
    "react-native-collapsible": "1.4.0",
    "react-native-country-picker-modal": "^0.8.0",
    "react-native-drawer": "^2.5.0",
    "react-native-dropdownalert": "3.9.1",
    "react-native-fluid-slider": "^1.0.2",
    "react-native-gifted-chat": "0.7.2",
    "react-native-keyboard-aware-scroll-view": "^0.8.0",
    "react-native-masked-text": "1.10.1",
    "react-native-modalbox": "1.7.1",
    "react-native-onesignal": "^3.2.12",
    "react-native-paper": "2.6.3",
    "react-native-parallax": "^0.3.0",
    "react-native-progress-bar-animated": "^1.0.6",
    "react-native-radio-buttons": "^1.0.0",
    "react-native-render-html": "3.10.0",
    "react-native-scrollable-tab-view": "^0.10.0",
    "react-native-side-menu": "^1.1.3",
    "react-native-snap-carousel": "^3.6.0",
    "react-native-swipe-list-view": "1.5.1",
    "react-native-swiper": "1.5.14",
    "react-native-timeago": "^0.4.0",
    "react-native-vector-icons": "6.2.0",
    "react-navigation": "^3.0.8",
    "react-redux": "5.1.1",
    "redux": "^4.0.0",
    "redux-persist": "^5.9.1",
    "redux-thunk": "^2.3.0",
    "reselect": "4.0.0",
    "sanitize-html": "1.20.0",
    "tcomb-form-native": "0.6.20",
    "urijs": "1.19.1",
    "url": "^0.11.0",
    "url-parse": "1.4.4",
    "util": "0.11.1",
    "uuid": "3.3.2",
    "validate.js": "^0.12.0",
    "wpapi": "1.2.1"
  },
  "devDependencies": {
    "babel-jest": "^25.0.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "babel-preset-react-native": "4.0.1",
    "jest": "^25.0.0",
    "react-test-renderer": "16.7.0",
    "reactotron-react-native": "2.1.5",
    "reactotron-redux": "2.1.3"
  }
}

app.json

{
  "expo": {
    "name": "Atcatat",
    "description": "Atcatat - store",
    "slug": "mstore-multivendor",
    "privacy": "public",
    "sdkVersion": "32.0.0",
    "version": "1.4",
    "orientation": "portrait",
    "primaryColor": "#cccccc",
    "icon": "./assets/icons/app.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#ffffff"
    },
    "packagerOpts": {
      "assetExts": [
        "ttf",
        "mp4"
      ]
    },
    "assetBundlePatterns": [
      "assets/**/*"
    ],
    "ios": {
      "bundleIdentifier": "com.atcatat.store",
      "supportsTablet": true
    },
    "android": {
      "package": "com.atcatat.store.andr",
      "versionCode": 3,
      "permissions": []
    }
  },
  "updates": {
    "fallbackToCacheTimeout": 0,
    "checkAutomatically": "ON_LOAD"
  }
}

请检查我的 package.json 和 app.json 文件,也许我做错了什么实际上我从在线商店购买了应用程序,它内置在以前的版本中,我对本机反应知之甚少。

【问题讨论】:

    标签: reactjs react-native native expo


    【解决方案1】:

    我最近在 35 和 34 上遇到了同样的问题。我相信这是因为这条线 "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz" 无效。尝试重新安装它并更改 app.json 中的文本。它应该会自动修复所有其他问题。

    【讨论】:

    • 是什么意思?我确实告诉你我需要更改哪些文本
    • 你的意思是 app.json 文件只有 32 到 33
    【解决方案2】:

    截至今天,expo-cli 具有命令 update

    所以如果你运行了expo update 35.0.0 或其他版本,但它没有解决错误,如果你已经退出了你的世博项目......

    检查您的app.json 中是否有正确的分离属性。请注意 URL 上 iosExpoViewURLandroidExpoViewURL 密钥的 sdk 编号。

    "detach": {
      "iosExpoViewUrl": "https://s3.amazonaws.com/exp-exponent-view-code/ios-v2.13.0-sdk35.0.0-a30ebc9b-3db4-42f4-b677-e468076baf18.tar.gz",
      "androidExpoViewUrl": "https://s3.amazonaws.com/exp-exponent-view-code/android-v2.13.0-sdk35.0.0-b816b7af-88da-4ca9-87a5-7438f0c21b6e.tar.gz"
    }
    

    【讨论】:

      【解决方案3】:

      从 Playstore 更新 expo 客户端为我解决了这个问题!

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-10-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-08-27
        • 2021-12-01
        • 1970-01-01
        相关资源
        最近更新 更多