Closed paulsizer closed 1 year ago
Hi @paulsizer,
Is https://github.com/paulsizer/expo-android-eas-build just a fresh Expo project? I don't think this one will fail. Does building it fails for you? Can you share the build id/URL for a expo-android-eas-build
build?
hi @dsokal it is a fresh expo project with all the packages I am using from another app that I am having the issue with. This is just a project I created so that it can be reproduced.
Build Id is 567fcb18-121b-48c3-a5e3-8815319fa9ba
I appreciate you looking into this.
Correct me if I'm wrong but https://github.com/paulsizer/expo-android-eas-build/blob/main/package.json doesn't have any custom dependencies installed. 567fcb18-121b-48c3-a5e3-8815319fa9ba
is not for that project.
Sorry to say but I'm 99.9% sure this is something project specific.
Also, please note that EAS Build cannot build a project that you cannot build locally - expo prebuild
+ building with Android Studio.
@dsokal apologies I forgot to commit the latest version of package.json, that should be done now.
https://github.com/paulsizer/expo-android-eas-build/blob/main/package.json
https://expo.dev/accounts/simplytrak/projects/my-app/builds/567fcb18-121b-48c3-a5e3-8815319fa9ba should be the right build output for that repo.
I have exactly this same issue, did you find a solution to it? using expo-build-proprieties is not working for me in android, it worked for IOS:
[ 'expo-build-properties', { android: { compileSdkVersion: 33, targetSdkVersion: 33, buildToolsVersion: '33.0.0', kotlinVersion: '1.8.0', }, ios: { deploymentTarget: '13.0', }, }, ],
@bogadrian What do you mean by "exactly the same issue"? Can you share the build id/url?
sure: id build: 32b3f8c0-ea9c-4835-8dcc-228e5f9eb2b6
@dsokal did you see the latest package.json file?
here is all my package.json. I am quite sure at least one of all this packages are not compatible with Expo 47 but I can't understand which one and what version of it.
{ "name": "freelancer-mobile-app", "version": "1.0.11", "main": "node_modules/expo/AppEntry.js", "engines": { "node": "16.15.1" }, "scripts": { "android": "expo run:android", "eject": "expo eject", "ios": "expo run:ios", "lint": "tsc --noEmit && eslint --ext .ts,.tsx src --color", "lint:fix": "eslint --fix --ext .ts,.tsx src --color", "start": "expo start --dev-client", "start:clean": "expo -c --dev-client", "web": "expo start --web", "test": "jest", "e2e": "detox test --configuration ios", "check:i18n": "cd ./translationScript && npm i && npm run check:i18n", "postinstall": "patch-package", "start:debug": "REACT_DEBUGGER=\"rndebugger-open --open --expo\" expo start", "prepare": "husky install" }, "dependencies": { "@alessiocancian/react-native-actionsheet": "^3.2.0", "@arelstone/react-native-email-chip": "2.2.4", "@dinero.js/currencies": "2.0.0-alpha.8", "@expo-google-fonts/quicksand": "^0.2.0", "@expo-google-fonts/sen": "^0.2.0", "@expo/config": "^7.0.2", "@expo/config-plugins": "^5.0.2", "@expo/vector-icons": "^13.0.0", "@formatjs/intl-displaynames": "^6.0.1", "@formatjs/intl-getcanonicallocales": "^2.0.1", "@formatjs/intl-locale": "^3.0.1", "@gorhom/portal": "^1.0.12", "@intercom/intercom-react-native": "^4.0.1", "@react-native-async-storage/async-storage": "~1.17.3", "@react-native-community/netinfo": "9.3.5", "@react-native-masked-view/masked-view": "^0.2.8", "@react-native-picker/picker": "^2.4.8", "@react-navigation/bottom-tabs": "^6.2.0", "@react-navigation/elements": "^1.2.1", "@react-navigation/native": "^6.0.6", "@react-navigation/stack": "^6.0.11", "@reduxjs/toolkit": "^1.7.1", "@segment/analytics-react-native": "^2.9.1", "@segment/analytics-react-native-plugin-adjust": "^0.5.0", "@segment/sovran-react-native": "^0.4.5", "@sentry/react-native": "4.9.0", "@shopify/restyle": "1.6.1", "@types/dinero.js": "1.9.0", "@types/google.maps": "^3.48.1", "@types/lodash.debounce": "^4.0.6", "@types/lodash.truncate": "^4.4.7", "@types/lodash.uniqby": "^4.7.6", "@types/luxon": "^3.0.1", "axios": "^0.26.0", "axios-curlirize": "^1.3.7", "babel-plugin-inline-dotenv": "^1.6.0", "buffer": "^6.0.3", "config-plugin-react-native-intercom": "^1.4.3", "dinero.js": "2.0.0-alpha.8", "expo": "~47.0.9", "expo-apple-authentication": "~5.0.1", "expo-application": "~5.0.1", "expo-auth-session": "~3.8.0", "expo-blur": "~12.0.1", "expo-build-properties": "~0.4.1", "expo-clipboard": "~4.0.1", "expo-constants": "~14.0.2", "expo-dev-client": "~2.0.1", "expo-device": "~5.0.0", "expo-document-picker": "~11.0.1", "expo-file-system": "~15.1.1", "expo-font": "~11.0.1", "expo-linear-gradient": "~12.0.1", "expo-linking": "~3.3.0", "expo-localization": "~14.0.0", "expo-notifications": "~0.17.0", "expo-random": "~13.0.0", "expo-secure-store": "~12.0.0", "expo-sharing": "~11.0.1", "expo-splash-screen": "~0.17.5", "expo-status-bar": "~1.4.2", "expo-tracking-transparency": "~3.0.1", "expo-updates": "^0.15.6", "expo-updates-interface": "^0.8.1", "flagsmith": "^3.14.1", "formik": "^2.2.9", "google-libphonenumber": "^3.2.27", "i18n-js": "^3.8.0", "intl": "^1.2.5", "jest-expo": "^46.0.0", "jest-mock": "^29.0.2", "jsvat": "^2.5.3", "jwt-decode": "^3.1.2", "lodash.debounce": "^4.0.8", "lodash.groupby": "^4.6.0", "lodash.isequal": "^4.5.0", "lodash.truncate": "^4.4.2", "lodash.uniqby": "^4.7.0", "lottie-react-native": "^5.0.1", "luxon": "^3.0.3", "moment": "^2.29.1", "patch-package": "^6.4.7", "react": "18.1.0", "react-error-boundary": "^3.1.4", "react-native": "0.70.5", "react-native-adjust": "^4.32.1", "react-native-blob-util": "^0.16.2", "react-native-calendars": "^1.1275.0", "react-native-date-picker": "^4.2.2", "react-native-email-link": "^1.12.2", "react-native-fbsdk-next": "^11.1.0", "react-native-flip-card": "^3.5.6", "react-native-floating-action": "^1.22.0", "react-native-gesture-handler": "~2.8.0", "react-native-keyboard-accessory": "^0.1.16", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-mask-text": "^0.7.0", "react-native-modalize": "^2.0.13", "react-native-pdf": "^6.5.0", "react-native-reanimated": "2.13.0", "react-native-reanimated-carousel": "3.1.5", "react-native-safe-area-context": "4.4.1", "react-native-screens": "~3.18.0", "react-native-svg": "12.5.0", "react-native-toast-message": "^2.1.1", "react-native-webview": "11.23.1", "react-query": "^3.34.16", "sentry-expo": "5.0.3", "yup": "^0.32.11" }, "devDependencies": { "@babel/core": "^7.12.9", "@config-plugins/react-native-adjust": "^2.0.0", "@config-plugins/react-native-blob-util": "^2.0.0", "@config-plugins/react-native-pdf": "^2.0.0", "@testing-library/jest-native": "^5.3.2", "@testing-library/react-hooks": "^7.0.2", "@testing-library/react-native": "^11.5.0", "@types/axios-curlirize": "^1.3.2", "@types/detox": "^18.1.0", "@types/google-libphonenumber": "^7.4.23", "@types/i18n-js": "^3.8.2", "@types/jest": "^27.5.2", "@types/lodash.groupby": "^4.6.7", "@types/lodash.isequal": "^4.5.6", "@types/react": "~17.0.21", "@types/react-native": "~0.67.6", "@types/react-native-flip-card": "^3.5.2", "@typescript-eslint/eslint-plugin": "^5.10.2", "@typescript-eslint/parser": "^5.10.2", "babel-plugin-module-resolver": "^4.1.0", "detox": "^19.10.0", "eslint": "^8.8.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^12.3.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-jest": "^24.3.6", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-unused-imports": "^2.0.0", "husky": "^8.0.1", "jest": "29.3.1", "jest-circus": "^27.5.1", "nock": "^13.2.4", "prettier": "^2.5.1", "react-test-renderer": "18.0.0", "slack-notify": "^2.0.2", "ts-jest": "^29.0.3", "ts-node": "^10.8.1", "typescript": "~4.3.5" }, "private": true, "resolutions": { "@expo/config-plugins": "~5.0.1", "@expo/prebuild-config": "~5.0.3", "expo-modules-autolinking": "0.10.3" } }
Yes, but I don't have time to debug which dependency is causing the issue. Actually, you're asking me to debug your application for you. This is not a minimal reproducible example.
What I would do if I had this problem:
This way you can find which dependency is causing the problem. Most likely this won't be a problem with EAS Build.
Also, why do you think this is a problem with EAS Build?
got it. thank you. it runs ok on local, no errors, only when trying to build on EAS server it fails
@dsokal Ok I think I have narrowed down the dependency thats causing the issue but not sure why this would be the case...
It looks like it is stripe!
"@stripe/stripe-react-native": "0.19.0"
The only issue is I am using the expo install command to add it to my project?
npx expo install @stripe/stripe-react-native
I would assume this brings in the correct version that is compatible with the version of Expo including EAS Build as this is what expo want's you to use? or is this not the case?
Or am I missing something?
For whoever running into my problem: I solved it. All I had to do was to move the 'expo-build-proprieties' plugin to be the first plugin in the plugins array in app.config. Now Android and Ios builds successfully.
@bogadrian is this just 'papering over the cracks' without finding the real issue?
I had the same issue, and just solved it.
The problem seems to be, indeed, due to stripe package. Since 0.19, it needs compileSdkVersion
to be at least 33:
https://github.com/stripe/stripe-react-native/releases/tag/v0.19.0
Then, I didn't have expo-build-properties
plugin, which made android/build.gradle
select the default values:
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '31.0.0'
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21')
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '31')
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '31')
Just changing the default values from 31 to 33 do the trick.
PS: for easier debugging, there's no need to build it remotely. Just head into the android
folder and run ./gradlew :app:assembleRelease
.
Build/Submit details page URL
https://expo.dev/accounts/simplytrak/projects/my-app/builds/567fcb18-121b-48c3-a5e3-8815319fa9ba
Summary
When I run eas build for the Android platform the build fails due to Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0..
Managed or bare?
Managed
Environment
npx expo-env-info
expo doctor
Error output
issue with the run gradlew step during the build
Reproducible demo or steps to reproduce from a blank project
https://github.com/paulsizer/expo-android-eas-build