[Unity Android Build] - Win32Exception: the system cannot find the file specified

Hello,
i know this kind of problem was posted many times already. I tried all the solutions i’ve seen so far but i’m still not getting rid of that error. That’s why i’m creating this post. I’m getting really desperated. I tried:

  • copy the zipalign to the tools folder.
  • install the Android SDK
  • install the latest JDK
  • link Unity5 External Tools to the JDK and SDK
  • set the JAVA_HOME variable
  • make sure the JAVA_HOME variable is set correct by typing ‘java’ in the console.
  • reinstall Unity 5

I’m using Windows 10 (maybe thats the reason?), Unity 5 Free, and jdk1.8.0_65 all on my Lenovo Yoga 2 Pro.

Am i missing something? I appreciate any solution.

  • GuitarKirby

It would help to see the full error message (what you posted is somewhat generic that could apply to mostly anything).

Thanks for the reply. It’s in german but translated the error is:
“Win32Exception: The system cannot find the file specified” and the same for the 2nd error.

Looks like Unity is unable to start adb (which is a tool that is used to communicate with the android device and is part of the Android SDK).

Did you define the Android SDK properly in Unity’s preferences? Also, can you make sure you have the “adb” program under the Android SDK folder ?

On the left you can see my path to the Android SDK on Unity’s preferences. It should be correct.
I didn’t find any adb file to execute. Just some adb.h files when i search for adb in my Android SDK folder.
Maybe i should reinstall the Android SDK

1 Like

Are you sure it is properly installed then? you should have the SDK manager or similar tool at the root where you can see what components you have installed, etc.

Hey, yeah it wasn’t properly installed. I just had to delete it and reinstall it.
Thank you very much for your help. This helped me alot, i really appreciate it!

1 Like

best way to reinstall sdk