8

Recently we build Android Apps using react expo and build signed APK using bellow command expo build:android -t apk or Android App Bundle expo build:android -t app-bundle

After we build signed APK, we tried to upload to Playstore and some error appears that wanted us to upgrade target API from 26 to 28. Have explored and reading several QA at SO and many of them are intended for React Native. How we can publish our APK to Play Store?

Here are 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",
 },
 }
}

We've tried to check the documentation here and there are property for compileSDKVersion or related like native apps.

In Native app we can easily configure as bellow

compileSdkVersion 27
buildToolsVersion "27.0.3"
minSdkVersion 16
targetSdkVersion 27

How to do that at React Expo?

Update 1 after reading from developer.android.com

When you upload an APK, it needs to meet Google Play’s target API level requirements. Starting August 1, 2019, Google Play requires that new apps target at least Android 9.0 (API level 28), and that app updates target Android 9.0 from November 1, 2019. Until these dates, new apps and app updates must target at least Android 8.0 (API level 26).

Still doesn't have any idea for that things.

asked Aug 16, 2019 at 8:20

2 Answers 2

2

Follow these steps:

  1. Close your Expo CLI server
  2. In app.json, change sdkVersion to "34.0.0"

  3. In package.json, change these dependencies:

    • react-native to "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz"
    • expo to "^34.0.3"
    • react to "16.8.3" — (this exact version)
    • react-navigation to "^3.11.1"
    • jest-expo to "^34.0.0" (if you use it)
    • sentry-expo to "~1.13.0" (if you use it)
  4. If you use react-navigation you should also run expo install react-native-gesture-handler react-native-reanimated

  5. Delete your project’s node_modules directory and run npm install again or use yarn

  6. Run expo start -c

After these steps, it should work.

Source: https://blog.expo.io/expo-sdk-34-is-now-available-4f7825239319

answered Oct 10, 2019 at 21:49
Sign up to request clarification or add additional context in comments.

Comments

-1

You need to change the sdkVersion property in your app.json and build the application again:

"sdkVersion": "34.0.0",
 "platforms": [
 "ios",
 "android"
 ],

using the expo build:android -t app-bundle command.

Make sure you have the latest expo cli installed.

Here's the corresponding blog post.

answered Aug 16, 2019 at 11:40

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.