building hello-jni sample in Android NDK causes error "Default target help does not exist in this project"
Trying to build hello-jni sample in Android NDK. Followed instructions per http://developer.android.com/sdk/ndk/overview.html#samples to create build .xml,
android update project -p . -s
Trying to run under Eclipse Helios SR2. I get this error:
Description Resource Path 开发者_运维问答 Location Type Default target help does not exist in this project build.xml /HelloJni line 2 Ant Buildfile Problem
in build.xml,
<project name="HelloJni" default="help">
any suggestions appreciated.
Suppose your install paths of sdk and ndk are
~/android-sdk-mac_x86/ and ~/android-ndk-r5c
If you don't use Eclipse and use ant
export PATH=${PATH}:~/android-sdk-mac_x86/tools:~/android-ndk-r5c
cd ~/android-ndk-r5c/samples/hello-jni
ndk-build
Assume target 1 is the project target
android update project -t 1 -p ~/android-ndk-r5c/samples/hello-jni
or simply
android update project -t 1 -p .
Debug build
ant debug
Emulator started or device connected
ant install
精彩评论