Summary
When running npx expo run:android android build fails with this error. See logs:
Tried to install expo-modules-core explicitly.
Tried upgrading Gradle plugin from 7.1.1 up to 7.3.3 and 7.5.
Did not find any more solutions on the internet.
Any idea what to do?
Related github issue https://github.com/expo/expo/issues/19596
What platform(s) does this occur on?
Android
SDK Version
46
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.6
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.5.0 - /usr/local/bin/npm
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
npmPackages:
#expo/metro-config: ^0.4.0 => 0.4.0
expo: ~46.0.16 => 46.0.16
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-native: 0.69.6 => 0.69.6
react-native-web: ~0.18.7 => 0.18.9
npmGlobalPackages:
eas-cli: 2.4.1
expo-cli: 6.0.6
Expo Workflow: bare
Minimal reproducible example
Package.json
{
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll",
"debug": "open 'rndebugger://set-debugger-loc?host=localhost&port=19000'",
"debug dev": "open 'rndebugger://set-debugger-loc?host=localhost&port=8081'"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo-google-fonts/raleway": "^0.2.2",
"#expo/config-plugins": "^5.0.0",
"#expo/metro-config": "^0.4.0",
"#expo/vector-icons": "^13.0.0",
"#react-native-async-storage/async-storage": "~1.17.3",
"#react-native-community/datetimepicker": "6.2.0",
"#react-native-masked-view/masked-view": "0.2.7",
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/native": "^6.0.13",
"#react-navigation/native-stack": "^6.9.0",
"#react-navigation/stack": "^6.3.1",
"#reduxjs/toolkit": "^1.8.5",
"#rneui/base": "^4.0.0-rc.6",
"#rneui/themed": "^4.0.0-rc.6",
"#sentry/react-native": "4.2.2",
"#stripe/stripe-react-native": "^0.19.0",
"dotenv": "^16.0.2",
"expo": "~46.0.16",
"expo-app-loading": "~2.1.0",
"expo-apple-authentication": "~4.3.0",
"expo-application": "~4.2.2",
"expo-background-fetch": "~10.3.0",
"expo-build-properties": "~0.3.0",
"expo-camera": "~12.3.0",
"expo-constants": "~13.2.4",
"expo-dev-client": "1.3.1",
"expo-device": "~4.3.0",
"expo-image-loader": "~3.2.0",
"expo-image-manipulator": "~10.4.0",
"expo-image-picker": "~13.3.1",
"expo-keep-awake": "~10.2.0",
"expo-linear-gradient": "~11.4.0",
"expo-local-authentication": "~12.3.0",
"expo-media-library": "~14.2.0",
"expo-modules-autolinking": "~0.10.1",
"expo-notifications": "~0.16.1",
"expo-screen-capture": "~4.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-system-ui": "~1.3.0",
"expo-task-manager": "~10.3.0",
"expo-updates": "~0.14.6",
"expo-web-browser": "~11.0.0",
"firebase": "^9.10.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-agora": "^3.7.1",
"react-native-bouncy-checkbox": "^3.0.4",
"react-native-calendars": "^1.1289.0",
"react-native-date-picker": "^4.2.5",
"react-native-dotenv": "^3.3.1",
"react-native-element-dropdown": "^2.3.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-gifted-chat": "^1.0.4",
"react-native-paper": "^4.12.5",
"react-native-progress": "^5.0.0",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "~3.15.0",
"react-native-svg": "12.3.0",
"react-native-toast-message": "^2.1.5",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.7",
"react-native-webview": "11.23.0",
"react-redux": "^8.0.4",
"redux": "^4.2.0",
"redux-saga": "^1.2.1",
"redux-thunk": "^2.4.1",
"sentry-expo": "~5.0.0"
},
"devDependencies": {
"#babel/core": "^7.18.6",
"#types/react": "~18.0.0",
"#types/react-dom": "~18.0.0",
"#types/react-native": "~0.69.1",
"#types/react-redux": "^7.1.24",
"expo-module-scripts": "^2.1.1",
"jest": "^26.6.3",
"jest-expo": "^46.0.0",
"react-test-renderer": "^18.2.0",
"remote-redux-devtools": "^0.5.16",
"typescript": "^4.8.4"
},
"resolutions": {
"standard-version-expo/**/#expo/config-plugins": "4.1.0",
"#types/react": "~18.0.0",
"#types/react-dom": "~18.0.0",
"#types/react-native": "~0.69.1"
},
"private": true,
"name": "hammashelppi-app",
"version": "2.0.0"
}
app.json
{
"expo": {
"name": "Hammashelppi",
"slug": "hammashelppi",
"version": "2.0.0",
"orientation": "portrait",
"icon": "./images/HH_Logo.png",
"splash": {
"image": "./images/HH_splash_image.png",
"resizeMode": "contain",
"backgroundColor": "#107CA2"
},
"userInterfaceStyle": "light",
"developmentClient": {
"silentLaunch": true
},
"packagerOpts": {
"config": "metro.config.js",
"sourceExts": [
"expo.ts",
"expo.tsx",
"expo.js",
"expo.jsx",
"ts",
"tsx",
"js",
"jsx",
"json",
"wasm",
"svg"
]
},
"updates": {
"fallbackToCacheTimeout": 300000,
"enabled": true,
"url": "https://u.expo.dev/****"
},
"assetBundlePatterns": ["**/*"],
"web": {
"favicon": "./images/favicon.png"
},
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "hammashelppi",
"project": "hammashelppi",
"authToken": "***"
}
}
]
},
"plugins": [
[
"#stripe/stripe-react-native",
{
"merchantIdentifier": "***",
"enableGooglePay": true
}
],
[
"expo-image-picker",
{
"photosPermission": "Allow Hammashelppi to access your gallery.",
"cameraPermission": "Allow Hammashelppi to access your camera."
}
],
["expo-camera"],
[
"expo-notifications",
{
"icon": "./images/HH_android_notifications_white.png",
"color": "#107CA2",
"mode": "production"
}
],
"sentry-expo",
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 33,
"targetSdkVersion": 31,
"buildToolsVersion": "30.0.2",
"kotlinVersion": "1.7.10"
}
}
]
],
"android": {
"icon": "./images/HH_android_logo_old.png",
"googleServicesFile": "./google-services.json",
"adaptiveIcon": {
"foregroundImage": "./images/HH_android_logo.png",
"backgroundColor": "#107CA2"
},
"package": "***",
"versionCode": 15,
"permissions": [
"NOTIFICATIONS",
"CAMERA",
"READ_EXTERNAL_STORAGE",
"RECORD_AUDIO",
"android.permission.RECORD_AUDIO",
"android.permission.CAMERA"
],
"useNextNotificationsApi": true
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "***",
"infoPlist": {
"NSFaceIDUsageDescription": "Face ID is used for authentication",
"UIBackgroundModes": ["fetch", "remote-notification"]
},
"buildNumber": "15",
"googleServicesFile": "./GoogleService-Info.plist"
},
"runtimeVersion": "2.0.0",
"extra": {
"eas": {
"projectId": "***"
}
}
}
}
eas.json
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
},
"development-android": {
"extends": "development",
"android": {
"buildType": "apk",
"gradleCommand": ":app:assembleRelease"
}
},
"development-ios": {
"extends": "development",
"ios": {
"enterpriseProvisioning": "universal"
},
"cache": {
"key": "18999"
}
},
"preview-android": {
"extends": "development",
"channel": "preview-android",
"developmentClient": false,
"android": {
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease"
}
},
"preview-ios": {
"extends": "development",
"channel": "preview-ios",
"developmentClient": false,
"ios": {
"enterpriseProvisioning": "universal",
"image": "latest"
},
"cache": {
"key": "18999"
}
},
"production-android": {
"extends": "development",
"distribution": "store",
"channel": "production-android",
"developmentClient": false
},
"production-ios": {
"extends": "development",
"distribution": "store",
"channel": "production-ios",
"developmentClient": false
}
},
"submit": {}
}
the problem is not in your project, the resource with the boost library is not available
https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2
If your kotlin version is "1.7.20"
Downgrading it to "1.6.0" in android/build.gradle helps
example : kotlin_version = "1.6.0"
I have created an app in React Native / Expo. It works fine during development but is crashing when I create a standalone app (expo build:android)
The splash screen gets displayed and then directly the app crashes.
This is not an issue of the Expo CLI, because I tried to build other apps and they seem to work fine.
My package.json file
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#bugsnag/expo": "^7.12.0",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/hooks": "^2.6.0",
"#react-native-community/netinfo": "6.0.0",
"#react-navigation/bottom-tabs": "^5.11.13",
"#react-navigation/native": "^5.9.6",
"#react-navigation/stack": "^5.3.5",
"apisauce": "^2.1.1",
"dayjs": "^1.10.6",
"expo": "~42.0.1",
"expo-blur": "~9.0.3",
"expo-constants": "^11.0.1",
"expo-image-picker": "~10.2.2",
"expo-jwt": "^1.4.1",
"expo-location": "~12.1.2",
"expo-notifications": "~0.12.3",
"expo-secure-store": "~10.2.0",
"expo-status-bar": "~1.0.4",
"formik": "^2.1.4",
"jwt-decode": "^3.1.2",
"jwt-encode": "^1.0.1",
"lottie-react-native": "4.0.2",
"moment": "^2.29.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-expo-image-cache": "^4.1.0",
"react-native-gesture-handler": "~1.10.2",
"react-native-image-slider-banner": "^1.0.2",
"react-native-image-slider-box": "^1.1.22",
"react-native-image-slider-with-text": "^1.0.0",
"react-native-pager-view": "5.0.12",
"react-native-progress": "^4.1.2",
"react-native-reanimated": "~2.2.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.4.0",
"react-native-scrollable-tab-view": "^1.0.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-tab-view": "^3.1.1",
"react-native-web": "~0.13.12",
"yup": "^0.28.5"
},
"devDependencies": {
"#babel/core": "^7.9.0"
},
"private": true
}
And my app.json
{
"expo": {
"name": "xxx",
"slug": "xxx",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./app/assets/icon.png",
"splash": {
"image": "./app/assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"extra": {
"bugsnag": {
"apiKey": "dff242972ecc8c9bbe9d5f36fac4d2d9"
}
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier" : "com.xxx.xx",
"buildNumber" : "1.0.0"
},
"android": {
"package" : "com.xxx.xx",
"versionCode" : 1,
"adaptiveIcon": {
"foregroundImage": "./app/assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./app/assets/favicon.png"
},
"description": ""
}
}
============ UPDATED SECTION ==================
I have google search for the solution and made some modification then I ran into another problem after running
expo start --no-dev --minify
I ran into few more issue
Sometime it throw
-- Failed to load all asset
-- Sometime I get ..Could not connect to development server.
Can somebody please help me to figure out this issue.
Thank you
I see a comment here, but I don't want to install expo-cli globally. I want my project's packages to be dictated by the package.json. This way when it's shared, nobody needs to do any other extra configuration. My package.json is:
{
"name": "my-new-project",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"upgrade": "expo upgrade",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/samples": "2.1.1",
"expo": "^31.0.2",
"expo-cli": "^3.22.3",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
"react-navigation": "^2.18.2"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0",
"jest-expo": "^31.0.0"
}
}
Here is my app.json
{
"expo": {
"name": "stuff",
"description": "A very interesting project.",
"slug": "stuff",
"privacy": "public",
"sdkVersion": "31.0.0",
"platforms": ["ios", "android"],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
Ok after spending countless hours on this, it's fixed. I basically just did what was asked and changed expo to 35.0.0 and have react-native point to sdk-35.0.0.tar.gz. Changed the version to 35.0.0 in app.json as well
try with this one
expo upgrade
or you can find your version documentation from
https://docs.expo.io/workflow/upgrading-expo-sdk-walkthrough/
in individual page has instruction
https://blog.expo.io/expo-sdk-38-is-now-available-ab6cd30ca2ee
Below 37.0.0 support
expo update 35.0.0
this code
I've recently updated my Expo SDK from 3.0 to 3.2 and I've suddenly started to get all kinds of erros, at first I needed to replace my use of vector icons from
import Icon from "react-native-vector-icons/Ionicons";
to
import {Ionicons} from '#expo/vector-icons';
Because I started to get the following error using the old method
fontFamily "Ionicons" is not a system font and has not been loaded through Font.loadAsync.
I checked the expo docs https://docs.expo.io/versions/latest/guides/icons/
It is the recommended method. But now when using this method I get the following message
The syntax "import { Font } from 'expo-font'" is deprecated. Use "import * as Font from 'expo-font'" or import named exports instead. Support for the old syntax will be removed in SDK 33.
So I'm confused as it is recommended to use this method in version 3.2 but it will be also deprecated in the next
I've tried changing my .babelrc file
{
"presets": [ "babel-preset-expo" ]
}
// Uitgeschakeld inverband met https://github.com/expo/expo/issues/2576
// {
// "presets": ["babel-preset-expo"],
// "env": {
// "development": {
// "plugins": ["transform-react-jsx-source"]
// }
// }
// }
Removing node_modules and reinstalling
checking expo version in app.json and package.json
App.json
{
"expo": {
"name": "Rapio",
"description": "Wait less, enjoy more.",
"slug": "Rapio",
"privacy": "public",
"sdkVersion": "32.0.0",
"ios": {
"bundleIdentifier": "com.rapio.consumerapp"
},
"android": {
"package": "com.rapio.consumerapp"
},
"platforms": ["ios", "android"],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
package.json
{
"name": "empty-project-template",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"#expo/vector-icons": "^8.0.0",
"axios": "^0.18.0",
"expo": "^32.0.0",
"navigation": "^5.1.0",
"react": "^16.6.0",
"react-native": "0.57.1",
"react-native-elements": "^1.1.0",
"react-native-fbsdk": "^0.8.0",
"react-native-maps": "^0.22.1",
"react-native-payment-gateway": "^0.4.3",
"react-native-simple-radio-button": "^2.7.3",
"react-native-vector-icons": "^6.4.2",
"react-navigation": "^2.18.2",
"react-redux": "^5.1.1",
"redux": "^4.0.1"
},
"devDependencies": {
"schedule": "^0.4.0"
}
}
I'm expecting to be able to use the correct method for using icons without getting error messages or warnings
Win 10 and latest expo. Have a new project set up with
npm install -g expo-cli
npm start
Everything works fine. Then add react-native-elements to the project together with the following code:
import { Button } from 'react-native-elements';
<Button />;
It show that Unable to resolve "react-native-elements" from "screens\LinksScreen.js".
This is app.json:
{
"expo": {
"name": "Orange",
"description": "A very interesting project.",
"slug": "Orange",
"privacy": "public",
"sdkVersion": "30.0.0",
"platforms": ["ios", "android"],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
And this is package.json:
{
"name": "my-new-project",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/samples": "2.1.1",
"expo": "^30.0.1",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-elements": "^0.19.1",
"react-navigation": "^2.16.0"
},
"devDependencies": {
"jest-expo": "30.0.0"
}
}
Any idea?
Have you done an npm install for the react-native elements? That could very well be your problem. Try
npm install --save react-native-elements
at the command line in the project folder.