Reputation: 3793
I was trying to go through the first sample exercise provided in Android NDK. I was trying to run the following command on cygwin
android update project –p
However, I am getting android: command not found error
.
I checked my PATH variables. It already had ANDROID_HOME
, ANDROID_HOME/platforms
, ANDROID_HOME/tools
, ANDROID_HOME/platform-tools
One thing that I noticed was that there is no application named android
in any of the folder. There is just an executable JAR file named android
. Is that OK , or , this is my mistake ?
My PATH value added on request
bin:/cygdrive/c/Program Files/Java/jdk1.7.0_03/bin:/cygdrive/c/Program Files/Java/jdk1.7.0_03/include:/cygdrive/c/Ant2/bin:/cygdrive/c/Android/android-sdk/tools:/cygdrive/c/Android/android-sdk/platform-tools:/cygdrive/c/android-ndk/android-ndk-r8b:/cygdrive/c/Program Files/Java/jdk1.7.0_03/lib:/cygdrive/c/Android/android-sdk/platforms:/cygdrive/c/Program Files/Java/jdk1.7.0_03/bin:/usr/lib/lapack
Can anyone predict what am I missing ?
Thanks :)
Upvotes: 6
Views: 7589
Reputation: 8598
C:\Users\Iuliia\AppData\Local\Android\android-sdk\tools\android.bat update project --path .
is the same as
android update project –p
if you haven't android
in your PATH. Don't forget to give your path to Android SDK.
Upvotes: 0
Reputation: 872
There are errors in your approach:
Supposing that you will fix this errors, the part that you are still missing is:
tools
directory in the root of your SDK directoryandroid update project –p . -t android-10
.dex
files, files for the Dalvik VMThis android ...
command is used to update the building setup to a particular path and target, after that you should have at least the minimum configuration to produce an apk if the source code is well written and organized.
If the application is only written in Java you only need to build the apk at this point, you can do this with an IDE like Eclipse or with ant
doing only ant debug
or ant release
from the root of your project.
If everything will be fine you will find the apk in your <project root>/bin
folder.
Upvotes: 1