과거 : D:\work\android\app\NDK\android-ndk-r4b;D:\work\android\app\NDK\android-ndk-r6\build\prebuilt\windows\arm-eabi-4.2.1\bin;
현재 : D:\work\android\app\NDK\android-ndk-r7;
http://millo.tistory.com/2
D:\work\android\app\NDK\android-ndk-r7\prebuilt\windows\bin\awk.exe => _awk.exe로 (삭제의미)
APP_ABI := all
APP_ABI := armeabi armeabi-v7a x86
Drifter
프로필 보기 한국어로 번역
추가 옵션 2010년12월21일, 오전8시50분
I tried this, and although it built successfully, the dependencies
didn't work correctly (I could change a header and it wouldn't
recompile the appropriate files).
So instead I tried editing build/core/definitions.mk and changed the
line
$(HOST_AWK) -f $(BUILD_AWK)/convert-deps-to-cygwin.awk $1.org > $1
&& \
to
sed -e "s/\(.\):\//\/cygdrive\/\L\1\//g" $1.org > $1 && \
which converts all the instances of C:\ to /cygdrive/c/ (along with
all the other drive letters).
http://groups.google.com/group/android-ndk/browse_thread/thread/83ef26ef301c87b7/b736b6595f01df74
http://www.rosoo.net/a/201108/14840.html
Error 1:
$ ndk-build
/cygdrive/c/andy/abc/obj/local/armeabi-v7a/objs/abc//hellow.o.d:1: *** multiple target patterns. Stop.
quick fix: Delete Obj folder from "C:\andy\prjM\obj\local\armeabi-v7a" then run ndk-build
or refer this
Error 2:
Android.mk:44: *** commands commence before first target. Stop.
fix: Check there are no comments,no space ,no empty line in the src includes of Android.mk
For example:
wrong:
LOCAL_SRC_FILES :=file1.cpp\
file1al.cpp\
#file1atures.cpp\
file1r.cpp\
file1le.cpp\
Satfile1.cpp\
Sfile1l.cpp\
file1e.cpp\
Sfile1face.cpp\
3rd line has #, 4th line has space(check with cursor),5th line is empty line
Right:
LOCAL_SRC_FILES :=file1.cpp\
file1al.cpp\
file1atures.cp\
file1r.cpp\
file1le.cpp\
Satfile1.cpp\
Sfile1l.cpp\
file1e.cpp\
Sfile1face.cpp\
Error 3:
$ ndk-build clean
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
/cygdrive/c/android-ndk-r4b/build/core/build-local.mk:85: *** Android NDK: Aborting . Stop.
Fix: include Android.mk location inside global application.mk and Android.mk
Run the command from the parent directory with app.mk and and.mk resides
Error 4:
Please define ANDROID_NDK_ROOT to point to the root of your
Android NDK installation.
Use case while executing shell script
xxx-desktop:~/bin/u/android-ndk-r5/build/tools$ ./rebuild-all-prebuilt.sh
Please define ANDROID_NDK_ROOT to point to the root of your
Android NDK installation.
// Run the script inside NDK root directory like shown below
xxx-desktop:~/bin/u/android-ndk-r5/build/tools$ cd ..
xxx-desktop:~/bin/u/android-ndk-r5/build$ cd ..
xxxx-desktop:~/bin/u/android-ndk-r5$ ./build/tools/rebuild-all-prebuilt.sh
Error 5: NDK r5 app(native-activity,native-audio,native-plasma) build problem
Compiling native-activity,native-audio,native-plasma on ndk-r5 give compile errors stating
header not found and so on ......
Quick fix: Rebuild all prebuilt
i;e execute shell script rebuild-all-prebuilt.sh to build on latest toolchain provided by android which will take for a while (atleast on my pc)
xxx-desktop:~/bin/u/android-ndk-r5$ ./build/tools/rebuild-all-prebuilt.sh
To follow build in another terminal, please use: tail -F /tmp/ndk-toolchain/build-CtAG7s/log.txt
Download sources from android.git.kernel.org
Using git clone prefix: git://android.git.kernel.org/toolchain
downloading sources for toolchain/binutils
downloading sources for toolchain/build
downloading sources for toolchain/gcc
downloading sources for toolchain/gdb
downloading sources for toolchain/gmp
downloading sources for toolchain/gold
downloading sources for toolchain/mpfr
Patching toolchain sources
Toolchain sources downloaded and copied to /tmp/ndk-toolchain/build-CtAG7s/src
Cleaning up...발행하기
Done.
Building arm-eabi-4.4.0 toolchain... (this can be long)
ERROR: Could bot build arm-eabi-4.4.0 toolchain!
xxxx-desktop:~/bin/u/android-ndk-r5$
Now change to native-activity folder and call ndk-build for successful libnative-activity.so
xxx-desktop:~/bin/u/android-ndk-r5/samples/native-activity$ ndk-build
Compile thumb : native-activity <= main.c
Compile thumb : android_native_app_glue <= android_native_app_glue.c
StaticLibrary : libandroid_native_app_glue.a
SharedLibrary : libnative-activity.so
Install : libnative-activity.so => libs/armeabi/libnative-activity.so
댓글 없음:
댓글 쓰기