Hi,
I am trying to build an APK for past few days using ‘eas build’. But facing issues which i am not able to resolve through any means. That’s why came to this forum with hope of a resolution.
-
My project worked fine on emulators / android devices through expo go
-
I have successfully created apk for this project through expo build
-
In the same project, I just changed login for returning users using async storage.
-expo doctor also shows some errors. I have updated all dependencies compatible to expo sdk 48. its error screenshot is given at below link-
expo doctor error -
after this eas dashboard runs several succesful steps but ultimately fails at run gradlew.
app.json
{
"expo": {
"name": "TOFI_App",
"slug": "TOFI_Tagging",
"version": "1.1.0",
"orientation": "portrait",
"icon": "./assets/white-icon1.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/tofiscreen.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/ec0fed5d-1c13-4504-a075-88036d1de361"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "IOSBuild",
"runtimeVersion": {
"policy": "sdkVersion"
}
},
"android": {
"googleServicesFile": "./google-services.json",
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"permissions": [
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.CAMERA",
"android.permission.ACCESS_FINE_LOCATION",
"android.permission.ACCESS_COARSE_LOCATION",
"android.permission.RECORD_AUDIO"
],
"package": "com.xxxxxxxxxxxxxx.TOFI_Tagging",
"config": {
"googleMaps": {
"apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxqkgGo2V1iJUVBgz8A"
}
},
"runtimeVersion": {
"policy": "sdkVersion"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"expo-image-picker",
{
"cameraPermission": "To click field photos, this app needs access of your mobile's camera."
}
],
"expo-build-properties"
],
"extra": {
"firebase": {
"apiKey": "xxxxxxxxxxxxx",
"authDomain": "xxxxxxxxx-xxxxxxxxxxxxxxxxxx.firebaseapp.com",
"databaseURL": "xxxxxxxxxxxxxxxxxxx.app",
"projectId": "tofi-xxxxxxxx",
"storageBucket": "tofi-xxxxxxxxxxx.appspot.com",
"messagingSenderId": "xxxxxxxxxx",
"appId": "1:xxxxxxxxxxx:web:ec5dbdexxxxxxxxxxxxxx0",
"measurementId": "G-xxxxxxxxxxxxxxxx"
},
"eas": {
"projectId": "xxxxxxxxxxxxxxxxxxxxxx75-88036d1de361"
}
}
}
}
Package.json
{
"name": "tofi_tagging",
"version": "1.1.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@dev-event/react-native-maps-draw": "^2.0.0",
"@expo/config-plugins": "~6.0.0",
"@expo/metro-config": "^0.1.48",
"@expo/ngrok": "^2.5.0",
"@expo/prebuild-config": "~6.0.0",
"@expo/vector-icons": "^13.0.0",
"@react-native-async-storage/async-storage": "1.17.11",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-firebase/app": "^12.3.0",
"@react-native-firebase/auth": "^12.3.0",
"@react-native-firebase/database": "^12.3.0",
"@react-native-firebase/storage": "^12.3.0",
"@react-native-masked-view/masked-view": "0.2.8",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"@react-navigation/stack": "^6.2.1",
"@sideway/pinpoint": "^2.0.0",
"@siposdani87/expo-maps-polygon-editor": "^0.4.0",
"@types/geojson": "^7946.0.8",
"core-js": "^3.24.1",
"deprecated-react-native-prop-types": "^2.3.0",
"expo": "^48.0.0",
"expo-app-loading": "^1.3.0",
"expo-build-properties": "^0.6.0",
"expo-camera": "~13.2.1",
"expo-cli": "^6.3.2",
"expo-constants": "~14.2.1",
"expo-dev-client": "^2.2.1",
"expo-dev-menu": "^2.2.0",
"expo-device": "~5.2.1",
"expo-firebase-core": "~4.1.0",
"expo-firebase-recaptcha": "~2.1.0",
"expo-image-picker": "~14.1.1",
"expo-location": "~15.1.1",
"expo-permissions": "~14.1.1",
"expo-secure-store": "~12.1.1",
"expo-splash-screen": "~0.18.2",
"expo-sqlite": "~11.1.1",
"expo-status-bar": "~1.4.4",
"expo-updates": "~0.16.4",
"fiction-expo-restart": "^1.0.5",
"firebase": "^9.21.0",
"firebase-admin": "^11.5.0",
"jwt-decode": "^3.1.2",
"modules": "^0.4.0",
"native-base": "^3.4.28",
"ngrok": "^4.3.3",
"node": "^16.17.0",
"npm": "^8.19.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.7",
"react-native-dropdown-select-list": "^1.0.18",
"react-native-fs": "^2.0.1-rc.2",
"react-native-gesture-handler": "~2.9.0",
"react-native-gradle-plugin": "^0.70.2",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-keychain": "^8.1.1",
"react-native-maps": "1.3.2",
"react-native-material-design": "^0.3.5",
"react-native-progress": "^5.0.0",
"react-native-really-awesome-button": "^1.6.0",
"react-native-restart": "^0.0.24",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-svg": "13.4.0",
"react-native-web": "~0.18.7",
"react-native-webview": "11.26.0",
"rn-nodeify": "^10.3.0",
"tslib": "^2.4.0",
"url": "^0.11.0",
"util": "^0.12.5",
"watchman": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@expo/ngrok": "^4.1.0",
"metro": "^0.72.1"
},
"private": true
}
eas.json
{
"cli": {
"version": ">= 1.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleRelease"
},
"ios": {
"buildConfiguration": "Debug"
},
"channel": "development"
},
"preview": {
"extends": "production",
"distribution": "internal",
"channel": "preview"
},
"production": {
"android": {
"buildType": "apk"
},
"channel": "production"
}
}
}
I am getting errors like this-
Any help to build the APK will be highly appreciated. Thanks!