problem with android build

I have a project that only has some cubes and it’s just for test. less than 30 MB.
when I want to build my project for android an error apears:

CommandInvokationFailure: Failed to create a assets.ap_ package
C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir="F:/Apps/SDK	ools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

I read somewhere that if you check the “Use Legacy SDK” the error should be solved. I did that and the error solved but no output will be in the folder after build.

Another problem with an service. I used to use “Play Services Resolver” but it seems to be deleted in Unity 2018.4
Also I used that github package but with no result.(Maybe I used it wrong)
here is the error text:

CommandInvokationFailure: Unable to convert classes into dex format.
C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir="F:/Apps/SDK	ools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

What should I do with those?

Both were SDK version erorrs.
Update build tools to the latest version solved it.