Recently I've been having problems successfully running an android build on Expo. See this copy paste of the error here:
w: FAILURE: Build failed with an exception.994[stderr] * What went wrong:995[stderr] Execution failed for task ':expo-permissions:compileReleaseJavaWithJavac'.996[stderr] > Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.997[stderr] * Try:998[stderr] 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.999[stderr] * Get more help at https://help.gradle.org1000[stderr] BUILD FAILED in 5m 41s1001
I’ve researched a bit and found these two topics: expo eas build failing Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)' Execution failed for task ':expo-permissions:compileDebugKotlin' Unfortunately many proposed solutions didn’t make any difference, so I’m almost reaching a point where I don’t know what to do :disappointed: My assumption is that there might be some version mismatch between expo and its submodules, but that’s just a guess.
Does someone has an idea what might go wrong here?
I’ve spent some time to sort out the issue, and I noticed that the following properties in build.gradle were set to Java version 1.8 after running expo eject:
```compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}```
In the expo docs I’ve found config to set some build tools version (https://docs.expo.dev/versions/latest/sdk/build-properties/#configuration-in-appjson--appconfigjs)>
Is there a way to reproduce this situation without pushing the build to expo? I’ve tried to run something like ./android/gradlew installRelease, but not entirely sure if it does the same as on Expo.dev