Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Editor & General Support' started by Dinesh_Punni, Oct 29, 2015.

  1. Dinesh_Punni

    Dinesh_Punni

    Joined:
    Oct 29, 2015
    Posts:
    12
    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
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    It would help to see the full error message (what you posted is somewhat generic that could apply to mostly anything).
     
  3. Dinesh_Punni

    Dinesh_Punni

    Joined:
    Oct 29, 2015
    Posts:
    12
    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.

    error.png
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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 ?
     
  5. Dinesh_Punni

    Dinesh_Punni

    Joined:
    Oct 29, 2015
    Posts:
    12
    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

    screenshot.png
     
    bautistaalderete43 likes this.
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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.
     
  7. Dinesh_Punni

    Dinesh_Punni

    Joined:
    Oct 29, 2015
    Posts:
    12
    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!
     
    shiv_1213s likes this.
  8. Baraiyashaktivan

    Baraiyashaktivan

    Joined:
    Apr 8, 2017
    Posts:
    5
    best way to reinstall sdk