android中ndk编译错误,Android NDK编译常见错误及解决方案
Android NDK编译常见错误及解决方案
Error 1:$ ndk-build/cygdrive/c/andy/abc/obj/local/armeabi-v7a/objs/abc//hellow.o.d:1: *** [color=#FF0000]multiple target patterns[/color]. Stop.quick fix: Delete Obj folder from “C:\andy\prjM\obj\local\armeabi-v7a” then run ndk-buildor refer thisError 2:Android.mk:44: *** [color=#FF0000]commands commence before first target[/color]. Stop.fix: Check there areno comments,no space ,no empty line in the src includes of Android.mkFor example:wrong:[code]LOCAL_SRC_FILES :=file1.cpp\file1al.cpp\#file1atures.cpp\file1r.cpp\file1le.cpp\Satfile1.cpp\Sfile1l.cpp\file1e.cpp\Sfile1face.cpp\[/code]3rd line has #, 4th line has space(check with cursor),5th line is empty lineRight:[code]LOCAL_SRC_FILES :=file1.cpp\file1al.cpp\file1atures.cp\file1r.cpp\file1le.cpp\Satfile1.cpp\Sfile1l.cpp\file1e.cpp\Sfile1face.cpp\[/code]Error 3:$ ndk-build cleanAndroid 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: *** [color=#FF0000]Android NDK: Aborting[/color] . Stop.Fix: include Android.mk location inside global application.mk and Android.mkRun the command from the parent directory with app.mk and and.mk residesError 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.shPlease define ANDROID_NDK_ROOT to point to the root of your Android NDK installation.// Run the script inside NDK root directory like shown belowxxx-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.shError 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 prebuilti;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.shTo follow build in another terminal, please use: tail -F /tmp/ndk-toolchain/build-CtAG7s/log.txtDownload sources from android.git.kernel.orgUsing git clone prefix: git://android.git.kernel.org/toolchaindownloading sources for toolchain/binutilsdownloading sources for toolchain/builddownloading sources for toolchain/gccdownloading sources for toolchain/gdbdownloading sources for toolchain/gmpdownloading sources for toolchain/golddownloading sources for toolchain/mpfrPatching toolchain sourcesToolchain sources downloaded and copied to /tmp/ndk-toolchain/build-CtAG7s/srcCleaning 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.soxxx-desktop:~/bin/u/android-ndk-r5/samples/native-activity$ ndk-buildCompile thumb : native-activity <= main.cCompile thumb : android_native_app_glue <= android_native_app_glue.cStaticLibrary : libandroid_native_app_glue.aSharedLibrary : libnative-activity.soInstall : libnative-activity.so => libs/armeabi/libnative-activity.so
android中ndk编译错误,Android NDK编译常见错误及解决方案相关推荐
- 【Android 安装包优化】Android 中使用 SVG 图片 ( Android 5.0 以下的矢量图方案 | 矢量图生成为 PNG 图片 )
文章目录 一.Android 5.0 以下的矢量图方案 二.矢量图生成为 PNG 图片 三.完整的 build.gradle 构建脚本 四.编译效果 五.参考资料 一.Android 5.0 以下的矢 ...
- crosstool-ng 编译交叉工具链的常见错误及解决办法
1.配置crosstool-ng产生的错误 1.1 ncurses headers files were not found Checking for 'ncurses/ncurses.h'... n ...
- c语言编译错误 原文,C语言常见错误与警告
C语言常见错误与警告 C语言常见错误与警告C语言常见错误: 1 invalid type argument of '->' (have 'struct qstr_xid_element') 这种 ...
- android中服务播放音乐,android中用Service播放音乐
一般的Android应用程序的音乐可以分为背景音乐和点击各种控件时的音效,前者一般为比较大的音乐文件,后者一般为比较小的音乐.在Android中一般用MediaPlayer类处理比较大的音频文件,用S ...
- android中怎么网络判断,Android中判断网络是否连接实例详解
Android中判断网络是否连接实例详解 在android中,如何监测网络的状态呢,这个有的时候也是十分重要的,方法如下: public class ConnectionDetector { priv ...
- android中edittext设置密码格式,Android 自定义EditText(带清理、密码可见、不可见)...
实际开发中经常会遇到输入框,各种不同的需求,在一般情况下,清除内容,以及密码可见与不可见基本很常见,那么不废话直接上代码! 在res\values\attrs.xml中 .java import an ...
- android中自适应布局教程,Android自适应布局设计技巧
由于目前在做的一款app需要适配手机和平板,所以我在研究怎么构建可适应所有屏幕尺寸的布局方法. 在web的自适应布局上我有很多经验,比如使用网格流,CSS3中的media queries属性等等,这些 ...
- 【译】Android中的安全数据— Android中的加密(第2部分)
目录 锁屏 选择一个钥匙 密钥存储 密钥生成 密钥管理 加密与解密 使用范例 下一步是什么 安全提示 锁屏 如果要保护数据,请保护设备. 为了更加安全,在提供对任何应用程序功能的访问权限之前,我们可以 ...
- 【译】Android中的安全数据— Android中的加密(第1部分)
目录 Java密码体系结构 Android Key Store 样例项目 下一步是什么 安全提示 Java密码体系结构 Android建立在Java密码体系结构(JCA)的基础上,该体系结构提供了用于 ...
- android中变量作用域,在 Android 和 Hilt 中限定作用域
将对象 A 的作用域限定到对象 B,指的是对象 B 的整个生命周期内始终持有相同的 A 实例.当涉及到 DI (依赖项注入) 时,限定对象 A 的作用域为一个容器,则意味着该容器在销毁之前始终提供相同 ...
最新文章
- android添加imageview,android – 以编程方式将ImageView添加到Layout
- springmvc-配置文件
- Perl Learning (5) —— 输入与输出
- QML做类似Android圆形头像
- Mybatis逆向生成报错:文档根元素 “project“ 必须匹配 DOCTYPE 根 “null“。
- 高通被欧盟指控垄断 或将面临高达25亿美元罚款
- 【kafka】kafka 零拷贝 技术
- vant在cell中加表格_在vant 中使用cell组件 定义图标该图片和位置操作
- php连接阿里云mysql
- 如何使用TeamViewer在会话期间画图?
- python语言磁力搜索引擎源码公开,基于DHT协议
- 【ParaView教程】第四章 常见问题 —— 在ParaView中怎样对一组数据做处理?
- STM32F107之CAN配置
- 【EndNote小技巧 - 文档文献的导出 | 设定引文放置位置 | 文献引用设置超链接】
- 系统硬盘分区模式之GPT
- git: patch 是什么/ 如何用
- 安全级别(security level)
- 中国新四大发明诞生 主打吃逛买以互联网为主
- ntp和chrony
- Matlab 常见错误(1)——提示“数组索引必须为正整数或逻辑值”或者“索引超出数组元素的数目”