android编译遇到问题修改
(注意要确定安装了jdk)
第一步: cd lichee; ./build.sh -p sun5i_elite -k 3.0 (apt-get install uboot-mkimage需要安装mkimage工具)
第二步: cd android; source build/envsetup.sh
第三步: root@QinQi:/work/shenbao-new/wifi_DDR128X16_shenbao/android# lunch
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. vbox_x86-eng
4. full_stingray-userdebug
5. full_wingray-userdebug
6. full_crespo4g-userdebug
7. full_crespo-userdebug
8. full_maguro-userdebug
9. full_toro-userdebug
10. full_tuna-userdebug
11. apollo_mele-eng
12. apollo_tvdevb-eng
13. crane_evb_v12r-eng
14. crane_evb-eng
15. crane_m1003h6-eng
16. elite_evb-eng
17. elite_nm307_v11-eng
18. elite_nm307-eng
19. nuclear_12_evb-eng
20. nuclear_evb-eng
21. full_panda-eng
Which would you like? [full-eng] 17
第四步:android# extract-bsp
第五步:make -j8
1)编译报错
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsAdapter.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsAllocation.o] Error 1
解决:
修改build/core/combo/HOST_linux-x86.mk61行,将
HOST_GLOBAL_CFLAGS+= -D_FORTIFY_SOURCE=0
修改成
HOST_GLOBAL_CFLAGS+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
2)编译报错
/bin/bash: jar: command not found
其实就是jar这个命令在系统变量里找不到
解决办法:
cd /usr/bin
sudo ln -s -f /usr/lib/jvm/jdk1.6.0_26/bin/jar
jdk安装目录按自己实际情况更改
如果提示javah:commond not found,于是照葫芦画瓢,输入命令
cd /usr/bin
ln -s -f /usr/lib/jvm/jdk1.6.0_26/bin/javah
如果提示javah:commond not found,于是照葫芦画瓢,输入命令
cd /usr/bin
ln -s -f /usr/lib/jvm/java/jdk1.6.0_26/bin/javah
在编译sdk时,如果提示javadoc:commond not found,
cd /usr/bin
ln -s -f /usr/lib/jvm/java/jdk1.6.0_26/bin/javadoc
3)编译报错
sh: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 140.
方法:sudo apt-get install gperf
4)编译报错
vim system/core/init/logo.c 修改
cp ./device/softwinner/common/hardware/include/drv_display_sun4i.h bionic/libc/include/
5)编译报错
arm-linux-androideabi-g++: ./frameworks/base/media/CedarX-Projects/CedarX/../CedarAndroidLib/LIB_ICS_/libstagefright_httplive_opt.a: No such file or directory
修改
cp -rf ./frameworks/base/media/CedarX-Projects/CedarAndroidLib/LIB_ICS_F23/ ./frameworks/base/media/CedarX-Projects/CedarAndroidLib/LIB_ICS_
frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable 'ParamName' set but not used [-Werror=unused-but-set-variable
修改
vi frameworks/compile/slang/Android.mk
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
6)编译报错
home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:69: undefined reference to `pthread_mutexattr_init'
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:75: undefined reference to `pthread_mutexattr_settype'
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:80: undefined reference to `pthread_mutexattr_setpshared'
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:89: undefined reference to `pthread_mutexattr_destroy'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::tryacquire()':
/home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] Error 1
修改
vi external/llvm/llvm-host-build.mk 添加
LOCAL_LDLIBS := -lpthread -ldl
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
修改: vim external/gtest/include/gtest/internal/gtest-param-util.h 添加:
#include <cstddef>
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
修改vim?external/mesa3d/src/glsl/linker.cpp?添加:
#include?<cstddef>
7)编译报错
In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
解决办法:
external/oprofile/libpp/format_output.h把:mutable counts_t & counts;
改为:counts_t & counts;
Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.idx
Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.version
target Prebuilt: (out/target/product/generic/system/bin/monkey)
target thumb C++: gatord <= system/core/gator-daemon/ConfigurationXML.cpp
target thumb C++: gatord <= system/core/gator-daemon/StreamlineSetup.cpp
target Executable: gatord (out/target/product/generic/obj/EXECUTABLES/gatord_intermediates/LINKED/gatord)
target Symbolic: gatord (out/target/product/generic/symbols/system/bin/gatord)
target Strip: gatord (out/target/product/generic/obj/EXECUTABLES/gatord_intermediates/gatord)
target thumb C++: camera. <= device/softwinner/common/hardware/camera/PreviewWindow.cpp
device/softwinner/common/hardware/camera/PreviewWindow.cpp:32:31: error: drv_display_sun5i.h: No such file or directory
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/camera._intermediates/PreviewWindow.o] Error 1
root@ubuntu:/home/yanfa/workspace/Android/android_sdk/shenbao-new/wifi_DDR128X16_shenbao/android#
修改:
vim device/softwinner/common/hardware/camera/Android.mk
LOCAL_C_INCLUDES += \
38 external/jpeg \
39 external/skia/include/core/ \
40 frameworks/base/core/jni/android/graphics \
41 frameworks/base/include/media/stagefright/openmax \
42 $(TOP)/frameworks/base/media/CedarX-Projects/CedarX/include/include_camera \
43 hardware/libhardware/include/hardware \
44 external/neven/FaceRecEm/common/src/b_FDSDK \
45 device/softwinner/common/hardware/include \ #add
46 $(TARGET_HARDWARE_INCLUDE)
v4l2_pix_size
8)
第六步:pack
android编译遇到问题修改的更多相关文章
- react-native android/ios 根据配置文件编译时自动修改版本号
开发react-native时大都有过这个操作,当版本迭代时候要修改app版本号时,一般都这样做 Android: 的要修改build.gradle文件的versionName ios: 打开xcod ...
- 【Android】MTK Android 编译命令
命令格式:./maketek [option] [project] [action] [modules] Option: -t ,-tee :输出log信息到当前终端 -o , -opt=-- : 编 ...
- Android——编译release版签名系统
http://blog.csdn.net/jscese/article/details/24243171 在我的第一篇博客里面http://blog.csdn.net/jscese/article/d ...
- 转: 加快Android编译速度
转: http://timeszoro.xyz/2015/11/25/%E5%8A%A0%E5%BF%ABandroid%E7%BC%96%E8%AF%91%E9%80%9F%E5%BA%A6/ 加快 ...
- android编译openssl静态库.a
github上有一个开源项目,已经为你编译openssl建好了工程. 地址:https://github.com/aluvalasuman/OpenSSL1.0.1cForAndroid 选择需要的版 ...
- [Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程
本文转载自:[Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程 1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6. ...
- Android编译环境配置
Android编译环境配置 网上关于Android编译环境配置的整理资料有不少,经整理亲测后,希望能给需要的亲们提供帮助. 主要分为四步: 1.安装JDK(Java Standard Edition ...
- 将linux和uboot集成到Android编译框架中
span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }.CodeMirror ...
- 为 Android 编译并集成 FFmpeg 的尝试与踩坑
前言与环境说明 随着 FFmpeg.NDK 与 Android Studio 的不断迭代,本文可能也会像我参考过的过期文章一样失效(很遗憾),但希望本文中提到的问题排查以及步骤说明能够帮到你,如果发现 ...
随机推荐
- sqoop导数据出现问题
执行下面命令的时候报错 ./sqoop import \ --connect jdbc:mysql://mini1:3306/userdb \ --username root \ --password ...
- apache2虚拟主机实现一个服务器绑定多个域名
1.apache2的配置 首先要配置好apache2,如果未配置,请参考我之前的博文:lamp的配置 2.域名的解析 将全部域名的www和@的A记录解析到云服务器的IP 3.虚拟主机的配置 1.配置h ...
- 【LeetCode】Grid Illumination(网格照明)
这道题是LeetCode里的第1001道题. 题目要求: 在 N x N 的网格上,每个单元格 (x, y) 上都有一盏灯,其中 0 <= x < N 且 0 <= y < N ...
- [android开发篇]项目目录结构
- 【java基础 7】java内存区域分析及常见异常
本篇博客,主要是读书笔记总结,还有就是结合培训分享的总结,没有太多的技术含量! java 的自动内存管理机制,使得程序员不用为每一个new惭怍的对象写配对的delete/ free代码(回想起C++的 ...
- 【Luogu】P3847调整队形(DP)
题目链接 DP果真是考思维啊 增加一个数的操作等价于删掉那个不和谐的数的操作. 所以1.2操作可以忽略. 剩下3.4操作,则可以设计f[i][j]是将区间[i,j]变成回文序列需要的操作数. if(a ...
- [USACO08DEC]Trick or Treat on the Farm (拓扑排序,DP)
题目描述 每年万圣节,威斯康星的奶牛们都要打扮一番,出门在农场的N个牛棚里转 悠,来采集糖果.她们每走到一个未曾经过的牛棚,就会采集这个棚里的1颗糖果. 农场不大,所以约翰要想尽法子让奶牛们得到快乐. ...
- Java:Session详解
以下情况,Session结束生命周期,Servlet容器将Session所占资源释放:1.客户端关闭浏览器2.Session过期3.服务器端调用了HttpSession的invalidate()方法. ...
- __getattr__ 与 __getattribute__的区别
原文博客地址 http://www.cnblogs.com/bettermanlu/archive/2011/06/22/2087642.html
- 怎么用SQL语句查数据库中某一列是否有重复项
SELECT 某一列, COUNT( 某一列 ) FROM 表 GROUP BY 某一列 HAVING COUNT( 某一列 ) 〉1 这样查询出来的结果, 就是 有重复, 而且 重复的数量.