[SOLVED] Unity 2020.1 Error building on Android platform with AMD
Hi, I am using Unity 2020.1.0f1. I have an AMD Ryzen CPU. When I try to build a project on Android platform I get this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files\Unity\Hub\Editor\2020.1.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\jre\bin\net.dll: Can't load this .dll (machine code=0xc0) on a AMD 64-bit platform
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Any idea how to solve this? Thanks
Answer by fran_m · Aug 05, 2020 at 04:39 PM
I have found the solution. There is a bug in the Adopt OpenJDK version with AMD processors, Unity 2020.1 used an old version of OpenJDK. The bug has been fixed in the latest versions.
Solution:
1) Install the latest Adopt OpenJDK 8 LTS (is the one used by Unity): https://adoptopenjdk.net/releases.html?variant=openjdk
2) In Unity menu "Edit - Preferences - External tools", set the JDK path to the JDK installed on step 1)
It should work until Unity update the builtin JDK.
Your answer
Follow this Question
Related Questions
Enabling Live Link? 0 Answers
Unable to install APK to Oculus Quest 0 Answers
Unity 2020 UniWebView UniWebViewDialog class duplication 1 Answer
What to do if my game became buggy due to switching my scripting backend to IL2CPP? 0 Answers
My game are really smooth on Unity test but really really lagging after build on Android 0 Answers