Android SDK is not valid.

I’m at a loss here on a recent update I did for my project. I upgraded expo to version 36.0.1 (RN 61.4) to move my project over and introduce newer and better ways to link dependencies, etc.

However, while I have my RN project working on iOS, on Android I am getting the following message on my device upon running via Android Studio:

36.0.0 is not a valid SDK version. Options are 35.0.0, UNVERSIONED.

Similarly if I open my logcat, I get:

E/ErrorFragment: ErrorActivity message: 36.0.0 is not a valid SDK version. Options are 35.0.0, UNVERSIONED.

I am confused since I have gone through all the steps to upgrade Expo to 36, I deleted node_modules and reinstalled, I upgraded my packages, and I am at a loss.

Here is the response from running expo diagnostics:

Expo CLI 3.27.4 environment info:
System:
OS: macOS 10.15.4
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.13.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.0. - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
npmPackages:
expo: ^36.0.0 => 36.0.2
react: 16.9.0 => 16.9.0
react-dom: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
react-native-web: ^0.11.7 => 0.11.7
react-navigation: ^4.0.0 => 4.4.0
npmGlobalPackages:
expo-cli: 3.27.4
Expo Workflow: managed

I have also cleared the cache in .expo and every time I run I perform expo r -c to ensure cached versions are not currently taking over.

Below I will also include my package.json and app.json for help. Thanks!

Package.json:

{
“scripts”: {
“start”: “react-native start”,
“android”: “react-native run-android”,
“ios”: “react-native run-ios”,
“web”: “expo start --web”,
“test”: “jest”,
“postinstall”: “jetify”
},
“jest”: {
“preset”: “jest-expo”,
“rootDir”: “.”,
“transform”: {
“^.+\.js$”: “babel-jest”
},
“transformIgnorePatterns”: [
“node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.|react-navigation|@react-navigation/.|@unimodules/.*|sentry-expo|native-base)”
]
},
“dependencies”: {
@expo/vector-icons”: “^10.0.0”,
@react-native-community/picker”: “^1.6.5”,
“android”: “^0.0.8”,
“axios”: “^0.19.0”,
“braces”: “^3.0.2”,
“constants”: “^0.0.2”,
“expo”: “^36.0.0”,
“expo-constants”: “~8.0.0”,
“expo-font”: “~8.0.0”,
“expo-google-app-auth”: “^6.0.0”,
“expo-google-sign-in”: “~8.0.0”,
“expo-image-picker”: “~8.0.1”,
“expo-linear-gradient”: “~8.0.0”,
“expokit”: “^35.0.3”,
“firebase”: “^6.5.0”,
“mobx”: “^5.13.0”,
“mobx-react”: “^5.4.3”,
“permissions”: “^0.1.0”,
“react”: “16.9.0”,
“react-dom”: “16.9.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz”,
“react-native-dialog”: “^5.6.0”,
“react-native-dialog-input”: “^1.0.7”,
“react-native-enhanced-popup-menu”: “^0.6.1”,
“react-native-firebase”: “^5.5.6”,
“react-native-gesture-handler”: “~1.5.0”,
“react-native-google-places-autocomplete”: “^1.8.2”,
“react-native-google-signin”: “^2.0.0”,
“react-native-image-crop-picker”: “^0.32.2”,
“react-native-keyboard-aware-scroll-view”: “^0.9.1”,
“react-native-maps”: “0.26.1”,
“react-native-masked-text”: “^1.13.0”,
“react-native-modal-selector”: “^1.1.2”,
“react-native-paper”: “^3.2.1”,
“react-native-reanimated”: “~1.4.0”,
“react-native-screens”: “2.0.0-alpha.12”,
“react-native-snackbar-component”: “^1.1.2”,
“react-native-status-bar-height”: “^2.4.0”,
“react-native-svg”: “9.13.3”,
“react-native-svg-animated-linear-gradient”: “^0.3.3”,
“react-native-swipeable-row”: “^0.8.1”,
“react-native-unimodules”: “0.7.0”,
“react-native-web”: “^0.11.7”,
“react-navigation”: “^4.0.0”,
“react-navigation-stack”: “^1.9.4”,
“react-navigation-tabs”: “^1.2.0”,
“react-scripts”: “^3.3.0”,
“react-with-firebase-auth”: “^1.0.4”,
“rn-fetch-blob”: “0.10.16”,
“stripe”: “^7.13.1”,
“styled-components”: “^4.4.0”,
“tipsi-stripe”: “^7.5.3”
},
“devDependencies”: {
@babel/core”: “^7.6.2”,
@babel/plugin-proposal-decorators”: “^7.6.0”,
@babel/runtime”: “^7.6.2”,
@react-native-community/eslint-config”: “^0.0.5”,
“babel-jest”: “24.1.0”,
“babel-preset-expo”: “^8.0.0”,
“firebase-mock”: “^2.2.10”,
“jest”: “^24.9.0”,
“jest-expo”: “^36.0.0”,
“jetifier”: “^1.6.6”,
“metro-react-native-babel-preset”: “0.56.0”,
“react-test-renderer”: “^16.9.0”,
“ws”: “3.3.2”
},
“resolutions”: {
“react-native-svg”: “9.9.5”
},
“private”: true
}`

App.json

{
“expo”: {
“name”: “AppNameHere”,
“slug”: “AppNameHere”,
“privacy”: “public”,
“platforms”: [
“ios”,
“android”
],
“androidStatusBarColor”: “#FF8708”,
“androidStatusBar”: {
“barStyle”: “light-content”,
“backgroundColor”: “#FF8708
},
“version”: “1.0.0”,
“orientation”: “portrait”,
“icon”: “./assets/icon.png”,
“splash”: {
“image”: “./assets/splash.png”,
“resizeMode”: “contain”,
“backgroundColor”: “#ffffff
},
“updates”: {
“fallbackToCacheTimeout”: 0
},
“assetBundlePatterns”: [
“**/*”
],
“ios”: {
“supportsTablet”: true,
“bundleIdentifier”: “com.appname”,
“publishBundlePath”: “ios/appName/Supporting/shell-app.bundle”,
“publishManifestPath”: “ios/appName/Supporting/shell-app-manifest.json”,
“config”: {
“googleSignIn”: {
“reservedClientId”: “Hidden”
}
}
},
“android”: {
“package”: “com.appName”,
“googleServicesFile”: “./google-services.json”,
“publishBundlePath”: “android/app/src/main/assets/shell-app.bundle”,
“publishManifestPath”: “android/app/src/main/assets/shell-app-manifest.json”,
“config”: {
“googleSignIn”: {
“certificateHash”: “Hidden”
}
}
},
“entryPoint”: “node_modules/expo/AppEntry.js”,
“isDetached”: true,
“detach”: {
“iosExpoViewUrl”: “https://s3.amazonaws.com/exp-exponent-view-code/ios-v2.13.0-sdk35.0.0-a30ebc9b-3db4-42f4-b677-e468076baf18.tar.gz”,
“androidExpoViewUrl”: “https://s3.amazonaws.com/exp-exponent-view-code/android-v2.13.0-sdk35.0.0-b816b7af-88da-4ca9-87a5-7438f0c21b6e.tar.gz
},
“scheme”: “expf206d00a12474520826e6698bb306f77”
}
}

Finally, I have republished under the new version, and when I run expo publish:history I get for my most recent publish:

publishedTime | appVersion | sdkVersion │ platform│ channel │ publicationId
│ Tue Sep 15 2020 16:48:13 MDT │ 1.0.0 │ 36.0.0 │ android │ default │ 805793f4-7b97-4922-a5b5-2c211f16ae8f
│ Tue Sep 15 2020 16:48:13 MDT │ 1.0.0 │ 36.0.0 │ ios │ default │ a5b98d3c-079c-4466-839b-7aada5b0eef6 │

Please help! I am very lost and would prefer not having to rebuild the entire project on a new init. Thanks!

See if running the following helps?

expo client:android

@wodin Do you mean expo client:install:android? I have run this and I get two messages. The first is: “Cannot read property ‘replace’ of undefined” followed by “Done!”.

So I have installed it via the app store and I have version 2.16.1 with supported SDKs 35, 36, 37, 38.

So for anyone that stumbles upon this problem for only Android, ensure that your build.gradle SDK versions are updated as seen here: Developing With ExpoKit - Expo Documentation. You may notice also that I needed to update my androidExpoViewUrl in my app.json which can be found in here: https://expo.io/--/api/v2/versions.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.