首页 > 解决方案 > SDK 32.0.0 不是有效的 SDK

问题描述

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

包.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"
  }
}

应用程序.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 文件,也许我做错了什么实际上我从在线商店购买了应用程序,它内置在以前的版本中,我对本机反应知之甚少。

标签: reactjsreact-nativenativeexpo

解决方案


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


推荐阅读