As the title says I get this error:
"java.lang.AssertionError: APK bundle must contain the expected embedded asset index.android.bundle"
After building using the latest expo CLI version. When i download my app from google store it crashes but it works fine in local dev mode using expo, so i have no clue what is going on.
Just in case this is package.json
{
"name": "dnd",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-native-fontawesome": "^0.3.0",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-community/checkbox": "^0.5.12",
"@react-navigation/native": "^6.0.11",
"@react-navigation/native-stack": "^6.7.0",
"@rneui/base": "^4.0.0-rc.5",
"@rneui/themed": "^4.0.0-rc.5",
"expo": "~46.0.8",
"expo-checkbox": "~2.2.0",
"expo-splash-screen": "~0.16.1",
"expo-status-bar": "~1.4.0",
"expo-updates": "~0.14.4",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-elements": "^3.4.2",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-svg": "12.3.0",
"react-native-text-size": "^4.0.0-rc.1",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@types/react": "~18.0.0",
"@types/react-native": "~0.69.1",
"typescript": "^4.6.3"
},
"private": true
}
And this is the app.json:
{
"expo": {
"name": "Hoja de personaje 3.5e",
"slug": "Hojadepersonaje35e",
"version": "1.0.2",
"owner": "calvix1",
"orientation": "portrait",
"icon": "./assets/appIcon.jpg",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.calvix1.hojadepersonaje35e",
"softwareKeyboardLayoutMode":"pan",
"adaptiveIcon": {
"foregroundImage": "./assets/appIcon.jpg",
"backgroundColor": "#FFFFFF"
},
"versionCode":3
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
The app is built using Expo sdk 46.
2
Answers
I just had the same issue. I had recently upgraded from Expo SDK 45 to Expo SDK 46 on a bare project.
I had to use the react-native upgrade helper (https://react-native-community.github.io/upgrade-helper/?from=0.68.2&to=0.69.5) to identify the expected version for gradle and some other dependencies.
In
android/build.gradle
I changed:to
This gave me some hints: index.android.bundle missing in APK after upgrading to RN 0.68
I had the same issue with Expo SDK 47, I resolved my problem updating my eas-cli to the latest version.
I was using the version 0.54 and I updated to 3.5.2
I had problems updating this, so I used Yarn to build:
and worked fine!