18

I can no longer run my app after updating expo version to 31.0.0. I needed this upgrade to do due iOS version 12 support. Thou after trying to build the Android app it is no longer working.

my package.json looks as below:

{
  "name": "myapp",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-native-scripts": "1.13.1",
    "jest-expo": "^31.0.0",
    "react-test-renderer": "16.3.0-alpha.1"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "jest"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "axios": "^0.18.0",
    "expo": "^31.0.4",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.1.tar.gz",
    "react-native-image-slider": "^2.0.3",
    "react-native-onesignal": "^3.1.4",
    "react-native-progress": "^3.4.0",
    "react-native-render-html": "^3.9.3",
    "react-navigation": "^1.5.11"
  }
}

app.json looks like:

{
  "expo": {
    "sdkVersion": "31.0.0",
    "name": "myapp",
    "slug": "myapp",
    "version": "0.1.1",
    "isDetached": true,
    "detach": {
      "scheme": "expe6b74e69f7904f4b8961fc359e0dc1ce",
      "androidExpoViewUrl": "https://s3.amazonaws.com/exp-exponent-view-code/android-v2.4.0-sdk26.0.0-e63d9209-070c-4118-b06b-c60e82da0b66.tar.gz"
    },
    "android": {
      "package": "com.myapp"
    }
  }
}

Android build.gradle app looks like this.:

android {
  compileSdkVersion 27
  buildToolsVersion '26.0.1'

  defaultConfig {
    applicationId 'com.ferrometal12'
    targetSdkVersion 27
    versionCode 1
    versionName '0.1.1'
    ndk {
      abiFilters 'armeabi-v7a', 'x86'
    }
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    // Deprecated. Used by net.openid:appauth
    manifestPlaceholders = [
      'appAuthRedirectScheme': 'host.exp.exponent'
    ]
  }

Any idea why this is not working on Android anymore?

NOte: before i had expo 26.0.0 I also had targetSdkVersion to 26, after updating expo I also updated targetSdkVersion to 27

UPDATE: This error occurs on emulator, I havent yet tried on real device, but I have the feeling that the same would be on real device too.

kenmistry
  • 1,934
  • 1
  • 15
  • 24
Mizlul
  • 1
  • 7
  • 41
  • 100

9 Answers9

17

You have to uninstall and then install the Expo on your Android device.

trojek
  • 3,078
  • 2
  • 29
  • 52
  • i dont have expo installed on my android device at all actually! – Mizlul Dec 03 '18 at 10:59
  • 1
    Fixed the issue. – Guilherme Ferreira Dec 10 '18 at 16:50
  • 2
    @Mizlul when we choose 'Run on Android Device/emulator', expo first install the 'Expo' App on Emulator and then execute the app. It occurs when Expo-CLI and Expo App is updated. You just need to uninstall Expo App from Emulator and run the project (npm start), it will install the updated version of Expo App on your Emulator. Same is the case of Android phone, you have to Update Expo App on your phone – Zaheer Dec 11 '19 at 13:51
9

Updated mobile expo app from play-store in android. It worked for me.

Sameer
  • 509
  • 3
  • 16
3

see the upgrade walk-trough ...

{
    "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
    "expo": "^31.0.0",
    "react": "16.5.0"
}

that sdkVersion which you've changed, most likely is the Android SDK version and should be:

"sdkVersion": "26.0.0"

the current maximum would be 28.0.0, but when it asks for 26.0.0, this should possibly be used.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
1

Good day,

THIS IS WORKING

  1. If you are using android studio

uninstall expo in the virtual android device. If you are not sure how to uninstall you can delete the virtual device in Android Virtual Device Manager so that all things are refreshed. Reinstall the virtual device again

  1. If you are using a real android device

find the expo and uninstall it.

Aljohn Yamaro
  • 2,629
  • 25
  • 22
0

My app is detached / ejected and I am using ExpoKit. The following configuration worked for me:

in package.json

"expo": "^31.0.6",
"expokit": "31.0.2",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.1.tar.gz",

in app.json

"sdkVersion": "31.0.0"

and seeing the upgrade walk-through

Aron Gates
  • 502
  • 4
  • 10
0

I experienced this problem today ; my Expo Android app brought this error after playstore updated this app.

I resolved the problem by installing an older version of Expo APP (You can find older versions of playstore apps on apkpure.com) and downloading Expo Android App of version 2.12 which supports SDK 31.0.0

0

This step is for ejected expo projects:

If you have run expo update 35.0.0 or other version and it did not solve the error, and if you had ejected your expo project...

Check if you have the right detach properties in your app.json. Note the sdk number on the URL for both iosExpoViewURL and androidExpoViewURL keys.

"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"
}
ofundefined
  • 2,692
  • 2
  • 18
  • 35
0

I was facing the same issue.The issue was solved by clearing data and cache of Expo app on Android device. It works fine now.

saifur
  • 637
  • 4
  • 17
0

To solve this issue just migrate to the latest version of node and expo cli. Uninstall expo on your phone and make a fresh install from the app store. You should be good to go.