React Native expo, apk build error: sdkVersion is missing from app.json.

问题描述 投票:0回答:1

我在React Native expo应用中执行exp build:android后,得到了这个错误。在我的React Native expo应用中进行exp build:android后,"sdkVersion is missing from app.json".以下是我的app.json。

    {
  "expo": {
    "name": "Parallel Desk",
    "slug": "RN-ParallelDesk",
    "platforms": ["ios", "android", "web"],
    "version": "1.1.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],

    "android": {
      "package": "com.paralleldesk.paralleldesk",
      "versionCode": 1,
      "icon": "./assets/icon.png"
    }
  }
}

error and code

android reactjs react-native react-native-android expo
1个回答
1
投票

你是否尝试在你的app.json中添加 "sdkVersion"?

我的app.json是这样的。

{
  "expo": {
    "name": "test-app",
    "slug": "test-app",
    "privacy": "public",
    "sdkVersion": "36.0.0",
    "platforms": [
      "ios",
      "android",
      "web"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "scheme": "myapp",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    },
    "description": "",
    "androidStatusBar": {
      "backgroundColor": "#B2D235"
    }
  }
}

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.