Question

Eas expo build error

When I gave the command to build the expo app with the help of the eas build command. It gave me this 👇 error.

[stderr] 
FAILURE: Build failed with an exception.
[stderr] 
* What went wrong:
[stderr] 
Execution failed for task ':expo-font:compileReleaseJavaWithJavac'.
[stderr] 
> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.
[stderr] 
* Try:
[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.
[stderr] 
* Get more help at https://help.gradle.org
[stderr] 
BUILD FAILED in 3m 26s
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
November 3, 2022

Hi there,

Gradle uses the Java distribution defined in your JAVA_HOME environment variable, you need to make sure that So make sure that the JAVA_HOME variable is set to a valid JDK 11 path.

To check if this is the case:

gradle --version

And then check your JAVA_HOME variable:

echo $JAVA_HOME

For more information on how to set that up, check out this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-22-04#step-3-setting-the-java_home-environment-variable

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.