Hi, I'm currently making an app that runs on Android with Unity, but I get the following error
Does anyone know the solution?
I want to make an Android application with UnityStatus
When I try to start or build a project, "Gradle failed to fetch dependencies." Is displayed, and then the following message is displayed.
ERROR: JAVA_HOME is set to an invalid directory: C: \ Program Files \ Java \ jdk1.7.0_51
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
-Installed the JDK and set JAVA_HOME to C: \ Program Files \ Java \ jdk1.8.0_271 in the system environment variable.
-Edit Unity->Preferences->External Tools->Set C: \ Program Files \ Java \ jdk1.8.0_271 in SDK
・ Unity Assets → External Dependency Manager → Android Resolver → Resolve
-Delete the project library and rebuild the project
Despite doing the above, the situation does not change. In short, it feels like Unity doesn't recognize the JAVA_HOME environment variable setting or hasn't changed from the previous setting.environment
OS: Windows10 64bit
Answer # 1
I think the system environment variable JAVA_HOME is incorrect.
Isn't it C: \ Program Files \ Java \ jdk1.7.0_51?
C: \ Program Files \ Java \ jdk1.8.0_271
If you are in a Windows environment, check below.
At the command prompt
Also, check the JVM version with -v of gradle.
(It is OK if the above environment variables and JVM match)
- java - i got an error when trying to execute a class that overloaded the constructor
- java - an error occurs when executing the jar file
- i get the following error in java code please tell me what is wrong
- when i run /gradlew eclipse, i get an error if compilejava --release is an invalid flag
- java - error: incompatible type: unable to convert string  to string
- i want to resolve a java error
- fighting ice execution error [java]
- java - i want to get the entire list from the db and display it, but an error occurs when executing the application
- when starting java_ide eclipse, the error message "missing jdk" is displayed
- java - web-app shows error in webxml
- java bigdecimal acceleration error when dividing by 0
- java - an error occurred when running with junit assertequals
- java - i want to eliminate the springboot error
- java - i want to get a 404 error when entering a random url in spring boot
- java - i want to display the corresponding argument in the error message when the command argument is not an integer
- java - i get an error when i run tomcat and i don't know what to do
- i don't understand the cause of the java nosuchelementexception error
- i'm getting a java compile error "no class, interface or enum", but i think the parentheses are supported
- java - kod-i want to know what to do when an error occurs in a method that should not have been written
- Problems when trying to call c# method from Java plugin
- java.lang.nosuchmethoderror: no non-static methodcationposted 'signature=' () v 'in class ljava.lang.Object;
- java : Run android application camera from my application
- java.lang.nosuchmethoderror: No non-Static Method with name= 'oncreate' signature= '() v' in class ljava.lang.Object;