UnityEditor.BuildPlayerWindow+BuildMethodException

Hey, i am new to unity and i am trying to run and build on my android phone but i am getting this error

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

i have latest sdk tools and latest java why is that happening?,Hey, i am new to unity and i am trying to build and run on my android phone but i am getting this error:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I have jdk 8 and latest sdk-tools installed
Why is this happening?

Hi @orizvida,

Unity currently uses some parts of older SDK’s.

This Post might help you. If not let me know.

Hey,
at first I had the same error, but then I updated my jdk, and changed the JDK-path of unity to the new JDK, and now I don’t get the error.

Maybe, unity offered you install new ver sdk and you take the button accept. Unity not understood or not found you folder. I fix this. 1. Install in unity hub new version sdk or download up version unity and set the flag Android Build Support(Sdk, JDK and NDK) 2. After installing, in standart your unity set the new path to sdk. unity take in target api flag (automatic highest) 3. Select the new target api (very up target) api and build. Unity says you (“You dont have is very up api , do you want to select flag automatic highest” 4. You must take yes. Its help me. Good luck, bro. I am from Ukraine and my grammar may be lame.