Running expo run:android fails with cryptic error

Hi all,

Would really appreciate some help here, I am running into a weird error when trying to build locally with expo run:android, this is the error:

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.

Cannot query the value of this provider because it has no value available.

I have double checked that the platform-tools installed is 29.0.3 and matches what SDK 43 says in teh gradle file, I have also installed the java version 8.

I am using Mac OS and trying to build a EAS managed project locally to run on Android Studio emulator.

Hope someone can give me some ideas / solutions how to fix this! Thank you!!

For anyone coming after me, this is not very well documented. It is important to pick the right Java version when building through Android Studio, basically Java version 8 seems to work well. The expo setup uses version 1.8, the best way to install this on Mac is to use homebrew, there’s an openJDK which works well. After that you also have to set the environment variable by export JAVA_VERSION=1.8 before you build.

This fixed it for me.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.