Ant compile of Android APK Cannot run program "android.bat" but it exists

1.1k Views Asked by At

Using the KonyOne platform (essentially an Eclipse plug-in), I am getting an error from the ANT build script stating that it cannot find "android.bat" (in directory "D:\GoogleAndroid\adt-bundle-windows-x86-20131030\sdk\tools), but when I search that directory, the file is there and non-empty.

1

There are 1 best solutions below

2
On

Getting the Android emulator and build set up can be annoying, but there is a pattern to it:

  • First off, make sure from the Windows command line that you would be able to call the android.bat. So from C:\ prompt, type: android.bat and the Android SDK manager should start. If this does not work, then you need to update your Windows Path.
  • Here is my path:

    Path=%JAVA_HOME%;C:\KonyOne\ImageMagick;%ANT_HOME%;%ANT_HOME%\bin;%ANDROID_HOME%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

    ANDROID_HOME=C:\Android\sdk

    ANDROID_SDK_HOME=C:\Android\sdk

  • Make sure your project has the Android sdk path set. Right click the project, go to Properties, select Kony Dev Studio, Build, and the Android home should be the path to the SDK folder ( in my case, it was C:\Android\sdk )

  • Be sure that you close your windows command prompt window and restart Kony Studio to get the Path changes to apply ( this is a Windows thing )