Android 之 text relocations的简单解决方法
2015-11-09 18:37
429 查看
Android 6.0系统上遇到native lib异常:AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: /system/lib/libcoupon.so: has text relocations导致程序崩溃,
简单解决办法:在mk脚本中, 对LOCAL_CFLAGS, 增加-fPIC参数, 同时按需求配置链接库的参数. 此方案的参考源是这里.(简单但会影响程序效率)
副一篇官方的解决方案(但是比较复杂):https://wiki.gentoo.org/wiki/Hardened/Textrels_Guide
简单解决办法:在mk脚本中, 对LOCAL_CFLAGS, 增加-fPIC参数, 同时按需求配置链接库的参数. 此方案的参考源是这里.(简单但会影响程序效率)
副一篇官方的解决方案(但是比较复杂):https://wiki.gentoo.org/wiki/Hardened/Textrels_Guide
相关文章推荐
- Android. ImageView with SVG Support
- android如何让后台服务service不被杀死(设置前台服务)
- 使用Android Studio搭建Android5.0集成开发环境
- Android自定义progress
- Android自定义相机,切换前后摄像头,照相机拍照
- Intent
- 详解Android中Service组件(一)
- android开发遇到的问题
- Android设备二维码扫描竖屏显示
- android判断当前应用在前台还是后台
- Android 计算器的开发
- Android监听程序进入后台
- SlidingMenu 在Android Studio使用详解
- Android 一张图看明白Hander的运行机制
- 调用 BitmapFactory.decodeByteArray 函数返回 null 值
- [Android开发]三级缓存初探索
- 支持addHeaderView、 addFooterView、分页加载数据的RecyclerView
- 怎样用 Android Annotations 写出高性能代码
- Android自定义控件之仿美团下拉刷新
- 监听android home键的实现方式