Title edited, old title :
SDK 34 produces .apk/.aab with “Target API 26”
I recently tried to upload an apk file (built with Expo SDK 32) to google play console, and ended up with the following error :
Your app currently targets API level 26 and must target at least API level 28 to ensure it is built on the latest APIs optimized for security and performance. Change your app’s target API level to at least 28.
I’ve tried updating to SDK 33, but the new APK built with SDK 33 got the same error, so I tried updating to SDK 34 (correcting code and updating dependencies in the meantime), but I still got the same error from google play console with SDK 34.
Each time I updated the SDK, I also changed the sdkVersion in app.json. I’ve also deleted node-modules folder after each upgrade, and deleted cache with expo r -c.
So right now, I’m using these :
"expo": "^34.0.1", "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz", "react": "16.8.3",
expo-cli “3.0.10” and sdkVersion is set to “34.0.0”, building using “expo build:android --no-publish”, but google play console is still saying I’m using target API 26.
Building an app-bundle using “-t app-bundle” has also the same result.
Is there something I’m missing, or some package I forgot to update in order for expo to build the apk using target API 28 ?
Thanks for your time and have a great day
Running throught the build logs, I’ve found something strange, the build is still using SDK 32 :
/app/turtle/workingdir/android/sdk32/tools-public /app/turtle/workingdir/android/sdk32/android/app /app/turtle/workingdir/android/sdk32/android/app
> Task :app:processProdKernelReleaseGoogleServices Parsing json file: /app/turtle/workingdir/android/sdk32/android-shell-app/app/google-services.json
It looks like it’s still using SDK 32 instead of SDK 34 - and that would explain why it’s using ‘target API 26’.