I have %JAVA_HOME% pointing to: C:Program FilesMicrosoftjdk-11.0.12.7-hotspot
I’ve manually set this version in gradle.properties:
org.gradle.java.home=C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot
package.json:
{
"name": "tsccmemberapp",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@config-plugins/react-native-branch": "^8.0.0",
"@expo-google-fonts/montserrat": "^0.2.3",
"@expo/metro-runtime": "~3.2.1",
"@expo/vector-icons": "^14.0.0",
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-community/cli-platform-android": "^13.6.9",
"@react-native-community/datetimepicker": "8.0.1",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@sentry/react-native": "^5.22.2",
"@sentry/wizard": "^3.22.3",
"axios": "^1.6.8",
"dotenv": "^16.4.5",
"eas": "^0.1.0",
"events": "^3.3.0",
"expo": "~51.0.10",
"expo-dev-client": "~4.0.18",
"expo-font": "~12.0.7",
"expo-modules-autolinking": "^1.11.1",
"expo-notifications": "~0.28.9",
"expo-permissions": "^14.4.0",
"expo-secure-store": "^13.0.2",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-web-browser": "~13.0.3",
"login": "^0.8.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.1",
"react-native-branch": "^6.2.2",
"react-native-fast-image": "^8.6.3",
"react-native-keychain": "^8.2.0",
"react-native-paper": "^5.12.3",
"react-native-paper-dropdown": "^1.0.7",
"react-native-paper-select": "^1.1.1",
"react-native-render-html": "^6.3.4",
"react-native-safe-area-context": "^4.10.1",
"react-native-screens": "3.31.1",
"react-native-web": "~0.19.10",
"react-native-webview": "13.8.6",
"timers": "^0.1.1",
"xml2js": "^0.6.2"
},
"devDependencies": {
"@babel/core": "^7.24.0"
},
"private": true
}
running eas build –platform android –profile production –clear-cache –build-logger-level=debug
outputs:
Running 'gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-7.3.3-all.zip
10%.
20%.
30%
40%
50%.
60
%.
70%.
80%.
90%.
100%
Welcome to Gradle 7.3.3!
Here are the highlights of this release:
- Easily declare new test suites in Java projects
- Support for Java 17
- Support for Scala 3
For more details see https://docs.gradle.org/7.3.3/release-notes.html
FAILURE:
Build failed with an exception.
* What went wrong:
Value 'C:Program FilesMicrosoftjdk-11.0.12.7-hotspot' given for org.gradle.java.home Gradle property is invalid (Java home supplied is invalid)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
>
Run with --scan to get full insights.
* Get more help at
https://help.gradle.org
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
if I remove the hardcoded java home from gradle.properties and build, the output error is:
EDIT
Running 'gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-7.3.3-all.zip
10%.
20%.
30%.
40%.
50%.
60%
70%.
80%.
90%.
100%
Welcome to Gradle 7.3.3!
Here are the highlights of this release:
- Easily declare new test suites in Java projects
- Support for Java 17
- Support for Scala 3
For more details see https://docs.gradle.org/7.3.3/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3.3/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
FAILURE: Build failed with an exception.
* Where:
Script '/home/expo/workingdir/build/node_modules/expo/scripts/autolinking.gradle' line: 4
* What went wrong:
A problem occurred evaluating script.
> Could not find method exec() for arguments [autolinking_9szxo5may2zrgnhpqcnrso9ei$_run_closure1@58dbf0e1] on object of type org.gradle.api.internal.provider.DefaultProviderFactory_Decorated.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with
--info or --debug option to get more log output.
> Run with
--scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Have had no issues building iOS and I suspect there is some form of incompatibility occurring but cannot for the life of me debug this. Any pointers on where to turn to?