錯誤内容:
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