【发布时间】:2019-12-22 13:47:42
【问题描述】:
最近我们使用 react expo 构建 Android 应用,并使用以下命令 expo build:android -t apk 或 Android App Bundle expo build:android -t app-bundle 构建签名 APK
在我们构建签名的 APK 后,我们尝试上传到 Playstore,但出现了一些错误,需要我们将目标 API 从 26 升级到 28。在 SO 上探索和阅读了几个 QA,其中许多是针对 React Native 的。我们如何将我们的 APK 发布到 Play 商店?
这里是app.json
{
"expo": {
"name": "***",
"slug": "***",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.2.3",
"orientation": "portrait",
"icon": "./assets/logo.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"enabled": true,
"checkAutomatically": "ON_LOAD",
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.qreatiq.foodmart",
"permissions": [
"CAMERA"
],
"googleServicesFile": "./google-services.json",
},
}
}
我们已尝试检查文档 here 并且有 compileSDKVersion 或相关的属性,如原生应用程序。
在 Native 应用中我们可以很容易地配置如下
compileSdkVersion 27
buildToolsVersion "27.0.3"
minSdkVersion 16
targetSdkVersion 27
如何在 React Expo 上做到这一点?
更新 1 从developer.android.com阅读后
当您上传 APK 时,它需要满足 Google Play 的目标 API 等级要求。自 2019 年 8 月 1 日起,Google Play 要求 新应用至少面向 Android 9.0(API 级别 28),并且该应用 更新从 2019 年 11 月 1 日起针对 Android 9.0。在这些日期之前, 新应用和应用更新必须至少面向 Android 8.0(API 级别 26).
仍然对那些事情没有任何想法。
【问题讨论】:
标签: android react-native expo