cundong / SmartAppUpdates

Android应用增量更新

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

生成so包得时候怎么老是报这个错误

jayronlou opened this issue · comments

/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:264: error: undefined reference to 'errx'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:272: error: undefined reference to 'err'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:275: error: undefined reference to 'err'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:287: error: undefined reference to 'err'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:290: error: undefined reference to 'err'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:316: error: undefined reference to 'BZ2_bzWriteOpen'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:317: error: undefined reference to 'errx'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:401: error: undefined reference to 'BZ2_bzWrite'
/Users/intelligentdroid/Desktop/pengpeng/code/apkUpdate/apkpatchlibraryserver/jni/com_cundong_utils_DiffUtils.c:403: error: undefined reference to 'errx'

这个问题解决了吗?我也遇到了

这个生成so文件不得自己写编译文件吗?

恩恩,是啊
我编译的时候出现这个问题
应该是这个cpp文件中的err函数无法引用。
但是err函数好像是系统就有的,不知道为什么编译不过去

不太清楚 我编译的时候没有遇到

我在AndroidStudio里编译的

你这个是要生成差量包?

我也遇到了上面的问题,这个问题有大神知道怎么解决么?

此问题我也遇到了,解决方案是在Android.mk中加入如下配置:
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true

因为没指定platform版本,默认是3,对应的err.h是个空文件,当然找不到了

在Application.mk中指定一下正确的platform版本就行了