Cannot lunch my game on android device

Hello.
I have a problem with lunching the project on android device. I have tried to lunch the basic project on Samsung galaxy S5. Everything is fine until the last PERFORMING FINAL APK PACKAGE OPERATION where in the log is error with ant.bat. I have install everything according to this tutorial Setting up Android Development Enviroment | Unreal Engine 4 - YouTube, Set all envirnomental variables in the Windows and set all information in the AndroidSDK in UE4. I even reinstalled UE4, JavaSDK and still have the same problem. If you know what might cause this problem, Please writ it.

I have attached the build log below

link text

Hi Rafciok_6,

I see this in your logs:

Error: Target id ‘lastest’ is not
valid.

You will want to set your SDK to ‘android-19’ and not ‘lastest’. That might fix the problem entirely.

If not, the error you’re getting is

ERROR: Exception in UnrealBuildTool:
ERROR: cmd.exe failed with args /c
“C:/NVPACK/apache-ant-1.8.2/bin/ant.bat”
debug

which is hard to diagnose. Here is another thread with several suggestions of what might be causing the problem.

Good luck!

Hi
Thanks for your answer. I have solved this problem. The problem was with the ant.bat and java. I had multiple version of java and two versions of ant installed on the computer. After reinstall windows and install sdk on the fresh installed system problem disappeared. This is probably not the best solution but it worked for me. Hope this advice will help someone.
Thanks