I am trying to create an APK build but getting this gradlew error
Node version: 18.16.0
command used: eas build -p android --profile preview
eas.json:
{
"cli": {
"version": ">= 3.14.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {}
},
"submit": {
"production": {}
}
}
Here is My Package.json file. package.json
{
"name": "app-name",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~48.0.18",
"expo-constants": "~14.2.1",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "^1.4.4",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-webview": "11.26.0"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}
I finally got this working by installing expo-dev-client
and the strange thing is that the expo documentation had not mentioned expo-dev-client
is required for building APK.