Detected problems with app native libraries (please consult log for detail): lib.so: text relocation

本文涉及的产品
日志服务 SLS,月写入数据量 50GB 1个月
简介: Detected problems with app native libraries (please consult log for detail): lib.so: text relocation

错误内容:

Detected problems with app nativelibraries
(please consult log for detail):
libxxx.so: text relocations
  • 解决办法一

修改targetSdkVersion<23。可是已经小于23了。

  • 解决办法二:配置Android.mk

LOCAL_LDFLAGS += -fPIC

  • 解决办法三:configure

configure CFLAGS=-fPIC

  • 检查so办法

readelf -a path/to/yourlib.so | grep TEXTREL


如果上边的shell命令输出类似下面的内容,则说明这该so文件不是PIC,是有text relocations问题的。


0x00000016 (TEXTREL)                    0x0



https://stackoverflow.com/questions/39957435/text-relocations-despite-fpic

https://github.com/DoubangoTelecom/doubango/issues/486


相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
目录
相关文章
|
Ubuntu Unix Linux
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
|
4月前
|
iOS开发
解决Error (Xcode): File not found:XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
解决Error (Xcode): File not found:XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
62 0
|
7月前
|
JavaScript
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
Error: Plugin/Preset files are not allowed to export objects, only functions……
Error: Plugin/Preset files are not allowed to export objects, only functions……
Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option ...
Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option ...
163 0
dyld Library not loaded Reason image not found 问题解决
添加第三方框架,然后启动app的时候会,提示dyld: Library not loaded: Reason: image not found 网上大部分的做法都是把Build Phases 里对应framework后边的选项修改成为Optional,但这个是治标不治本,还是没法解决问题
212 0
|
Java C语言 C++
JNI ERROR (app bug): local reference table overflow (max=512)
JNI ERROR (app bug): local reference table overflow (max=512)
337 0
JNI ERROR (app bug): local reference table overflow (max=512)
|
Shell
Detected problems with app native libraries (please consult log for detail): lib.so: text relocation
Detected problems with app native libraries (please consult log for detail): lib.so: text relocation
168 0
编译mate-control-center:error: required directory ./help does not exist
编译mate-control-center:error: required directory ./help does not exist
101 0
|
Java Shell PHP
Guidelines for Function Compute Development - Use Fun Local for Local Running and Debugging
Preface The following key concepts are involved in this document: Function Compute: an event-driven service that allows you to focus on writing and .
1784 0
下一篇
DataWorks