When I try to run it on android, I get the following mistake:
Could not determine the dependencies of null.
Could not resolve all dependencies for configuration ‘:classpath’.
> The new Java toolchain feature cannot be used at the project level in combination with source and/or target compatibility
Any help would be appreciated
2
Answers
Might have something todo with the JDK you have installed. I would recommend installing JDK17 and trying to run it with that.
i had the same problem as you.
Try to run
npx react-native doctor
to see if everything is fine.At the beginning i had the wrong jdk version (v21) and it didnt work because it has to be older than v20. so i installed v17 and updated JAVA_HOME variable and didnt work either (but it’s one stop closer).
i tried to create a new project again with
npx react-native@latest init AwesomeProject
from react docs and it worked