Search code examples
androidreact-nativegradlegradleweas

react native eas local android build gradlew failure


Im running on a Mac M1 Sonoma.

I am attempting to do eas local builds. I have successfully accomplished an ios local build with eas build -p ios --local. All builds perfectly. When doing a eas build -p android --local, I am getting an error when it runs gradlew. I am manually making the steps now to track it down. I run npx expo-doctor and it runs clean. No errors. I then do an expo prebuild and that finishes, no errors. I cd into the android directory and run gradlew and I get the following error:

enter image description here

Any insight on this error? Could this be a Java version issue?


Solution

  • Figured out my own solution. Posting it here in case anyone else needs it. When I first ran gradlew it gave me a notice that it could not find Java, and sent me over to java.com to install, which I did. And I just installed the latest and greatest that was on their front web page, which was java 8. That is what was failing. When I did an EAS managed build, I looked in their logs and saw they were using JDK 11. So I removed the Java 8, and then installed the JDK 11, and everything built as expected.