Android NDK编译常见错误及解决方案
来源:互联网 发布:ubuntu运行apk 编辑:程序博客网 时间:2024/05/16 07:39
转自:http://chinavideo.org/forum.php?mod=viewthread&tid=10821&page=1
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:
3rd line has #, 4th line has space(check with cursor),5th line is empty line
Right:
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
0 1
- Android NDK编译常见错误及解决方案
- Android NDK编译常见错误及解决方案
- Android NDK编译常见错误及解决方案
- Android NDK编译常见错误及解决方案
- 使用AndroidStudio编译NDK的方法及错误解决方案
- 使用AndroidStudio编译NDK的方法及错误解决方案
- 使用AndroidStudio编译NDK的方法及错误解决方案
- 使用AndroidStudio编译NDK的方法及错误解决方案
- Android NDK编译错误
- android ndk编译错误
- Android开发-----NDK开发中的一些常见错误及解决办法
- Android开发-----NDK开发中的一些常见错误及解决办法
- Android开发-----NDK开发中的一些常见错误及解决办法
- Android Studio NDK及so文件开发 以及常见错误
- Android NDK使用常见错误
- Android NDK使用常见错误
- Android NDK使用常见错误
- Android NDK使用常见错误
- ios
- 证明不是哈密顿图的几种方法归纳总结
- linux设备驱动中的并发控制
- 1.2.线程基础_中断线程
- 腾讯2014实习生招聘一道附加题 DP和分治两种解法
- Android NDK编译常见错误及解决方案
- poj 2385 Apple Catching 简单DP
- Unsupported compiler 'com.apple.compilers.llvmgcc42' selected for architectu
- SQL JOIN方法整理
- BIEE 11g 11.1.1.7.1跨事实指标不使用full outer join问题解决办法
- C++ 指针基本用法总结
- 兼容Firefox和IE的禁用Tab键JS代码
- 解决Nginx+Tomcat下客户端https请求跳转成http的问题
- Effective Objective C------ 1不要忘本