Sorry to ask such a noob question, but the NDK documentation is wrong (r7b):
If you are developing in Eclipse with ADT, use the New Project Wizard
to create a new Android project for each sample, using the “Import
from Existing Source” option and importing the source from
<ndk>/apps/<app_name>/project/. Then, set up an AVD, if necessary, and
build/run the application in the emulator.
There is no “apps” folder, and the samples do not contain a “project” folder. So … what is the correct way to run a sample?
Also, can I configure Eclipse to build the C++ portion of the code automatically?
.projectfile that Eclipse creates. No file or folder is created with this name, and the output binaries do not seem to contain this name.<uses-sdk>in AndroidManifest.xml or from the "target" line in default.properties. I also don’t know why the two may be different (e.g. in the bitmap-plasma sample,target=android-9but<uses-sdk android:minSdkVersion="8"/>.)Eclipse won’t build the native code by itself, but it will automatically deploy the native code (e.g. libplasma.so) if it is aware of it. After you build the native code on the command line, e.g.:
Right-click your project and choose "Refresh", otherwise Eclipse might fail to upload the native code when it starts the emulator.
Finally, to run the sample, right-click the project and choose Run As | Android application. See here about choosing which emulator is used.
See here about configuring Eclipse to build the native code automatically.
I am curious why NDK produces two *.so files with very different sizes for each ABI, e.g. it creates
libs/armeabi-v7a/libplasma.so(15 KB) but alsoobj/local/armeabi-v7a/libplasma.so(63 KB). Anyone know the difference?