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

NDK编译php,Android NDK编译常见错误及解决方案相关推荐

  1. android中ndk编译错误,Android NDK编译常见错误及解决方案

    Android NDK编译常见错误及解决方案 Error 1:$ ndk-build/cygdrive/c/andy/abc/obj/local/armeabi-v7a/objs/abc//hello ...

  2. Android NDK 概述(Android NDK Overview)

    Android NDK 功能概述 Android NDK就是一套用于把C/C++源码编译得到的二进制机器码嵌入应用安装包的工具. Android NDK是对Android SDK的一个补充,可以帮助你 ...

  3. Android布局文件错误,android 布局文件常见错误

    1.'Missing contentDescription attribute on image' in XML 原因:缺少图片描述,在 ADT 16 开始会抛出这个警告,确保开发者为图片添加内容描述 ...

  4. 大数据常见错误及解决方案

    大数据常见错误及解决方案(转载) 1.用./bin/spark-shell启动spark时遇到异常:java.net.BindException: Can't assign requested add ...

  5. MySQL数据库常见错误及解决方案

    MySQL数据库常见错误及解决方案 1 MySQL无法重启问题解决Warning: World-writable config file '/etc/my.cnf' is ignored 原因 今天帮 ...

  6. Hadoop中的MapReduce框架原理、数据清洗(ETL)、MapReduce开发总结、常见错误及解决方案

    文章目录 13.MapReduce框架原理 13.7 数据清洗(ETL) 13.7.1 需求 13.7.1.1 输入数据 13.7.1.2 期望输出数据 13.7.2 需求分析 13.7.3实现代码 ...

  7. 大数据技术之Hadoop(Hadoop企业优化常见错误及解决方案)

    6.1 MapReduce 跑的慢的原因 6.2 MapReduce优化方法 MapReduce优化方法主要从六个方面考虑:数据输入.Map阶段.Reduce阶段.IO传输.数据倾斜问题和常用的调优参 ...

  8. gulp压缩js转义es6的常见错误及解决方案

    gulp压缩js转义es6的常见错误及解决方案 参考文章: (1)gulp压缩js转义es6的常见错误及解决方案 (2)https://www.cnblogs.com/uimeigui/p/11797 ...

  9. Mac提示app损坏、Error,Mac电脑最常见错误的解决方案

    这篇文章蓝同学给大家分享一下Mac电脑上最常见错误的解决方案. 以下仅给出部分错误提示截图,类似的错误提示还有磁盘映像损坏.xxx.app有啥啥问题.... ①提示xxx.app已损坏,让你移到废纸篓 ...

最新文章

  1. Ajax之同步请求和异步请求的区别
  2. 召回:是塔,是塔,但不是双塔!
  3. 排队问题解题思路_1120各数的认识解决问题
  4. Vue Vuex todo举例
  5. 你手上的PCB怎么制作的?几张动图揭晓工厂生产流程
  6. ubuntu系统配置nijia_在Debian系统中使用backupninja定制备份计划的教程
  7. linux内核实验教程答案,20199310《Linux内核原理与分析》第十五周作业 Linux安全实验...
  8. 微软 CTO 韦青:5G 与亚里士多德
  9. 贪心算法及几个常用的例题
  10. [附源码]Java计算机毕业设计SSM宠物领养系统
  11. 程序员常去的14个顶级开发社区
  12. C语言基础丨(六)程序结构——顺序结构【1】
  13. Dropping Balls
  14. 深入理解Android相机体系结构
  15. 纸壳CMS 3.0升级.Net Core 2.1性能大提升
  16. BLUETECH 聚蓝滤水壶的使用方法
  17. Asp.Net 上传图片并生成高清晰缩略图
  18. 17岁和27岁的自己
  19. 密室逃脱1深红色房间
  20. iPhone又被拼多多砍了,错过一天等一年?网友:别急,天天双11

热门文章

  1. layui 如何动态加载局部页面_从输入URL到页面加载的过程?如何由一道题完善自己的前端知识体系!
  2. C++之继承探究(六):虚函数和多态
  3. c与指针 从一个字符串中提取子串_python实现找出来一个字符串中最长不重复子串...
  4. java程序设计_Java程序设计--接口interface(笔记)
  5. C++socket编程(三):3.7 服务端回应send客户端数据
  6. 计算机教师的幸福,如何成为一名幸福信息技术教师
  7. 测试色谱柱柱效的软件,高效液相色谱柱柱效测定
  8. js <->java 时区处理
  9. Boosting GDBT
  10. C++ wchar_t