设备是android 4.1的平板电脑,支持armeabi-v7a和mips,为了能用上poco c++ lib,用cmake编译了poco mips架构的lib,但在android studio里引用运行时就报

cannot locate symbol 'sigemptyset'

google了下,将

set(ANDROID_NATIVE_API_LEVEL android-21)改为
set(ANDROID_NATIVE_API_LEVEL android-16)
就ok了,如果是Application.mk文件,
APP_PLATFORM := android-16

-------------------------------------------------------

Android ndk cannot find symbol “sigemptyset”

I am building a C app for android, I use 'sigemptyset' in my app, when I compile the code using NDK it is compiled successfully, but when running the app I get cannot locate symbol 'sigemptyset'.

After searching I found that the problem is that I build the app using ndk-r11 which build for android-5 but I am running the app on android 4.4 where sigemptyset definition has changed. so I added the following to Android.mk:

TARGET_PLATFORM := android-19

but I still get the same error

Does anyone know how to fix this?

EDIT:

This question is not a duplicate of another question nor the answer there suggests changing the APP_PLATFORM parameter in Application.mk

The cause of problem is not the version of NDK that was used but version of target platform. android-19 is the last platform version where sigemptyset() (and many other functions) was declared as inline just at platform headers. As result - system libc on that devices doesn't contain such functions. So you are right - you should use proper target platform to allow your code to run on older devices. But you are doing it incorrectly. All that you need is add

APP_PLATFORM := android-19

to your Application.mk.

android cannot locate symbol 'sigemptyset'问题解决的更多相关文章

  1. cannot locate symbol "atof" referenced by错误分析

    ndk从r8升级到r10后, 使用eclipse编译出来的so库报错了,加载库的时候报错cannot locate symbol "atof" referenced by 原因:A ...

  2. [转]NDK编译库运行时报dlopen failed: cannot locate symbol "__exidx_end" 解决办法

    原文链接:http://blog.csdn.net/acm2008/article/details/41040015 当用NDK编译的库在运行加载时报如下错: dlopen("/data/d ...

  3. NDK编译库执行时报dlopen failed: cannot locate symbol "__exidx_end" 解决的方法

    当用NDK编译的库在执行载入时报例如以下错: dlopen("/data/data/xxx.xxx.xxx/lib/libxxx.so") failed: dlopen faile ...

  4. Android SDK Manager无法更新问题解决

    有时候在网络不好的情况下,android sdk manager更新可能一直报错.原因跟国内对于google相关服务的访问受限有关系,需要设置代理访问. 最近也遇到了这个问题.解决方法如下. 启动An ...

  5. Android studio 中国的垃圾问题解决

    为了获得良好的刚安装Android studio, 实例importproject时刻,你会发现很多中国的文件夹显示异常.例如下面的附图: 为什么会出现这个问题呢,事实上原因非常easy,由于Andr ...

  6. Android Studio项目构建常见问题解决

    1. 创建或导入项目后编译时一直在等待 问题: 原因:AS连网去下载gradle了,但是网络不好或不通 解决:禁用网络,AS就会立即自动终止下载进入到主界面了.此时再去指定离线的gradle版本进行编 ...

  7. failed: dlopen failed: cannot locate symbol

    修改proj.android/jni/Application.mk 添加:APP_PLATFORM := android-19

  8. Android SDK无法更新的问题解决办法

    问题: SSL hostname in certificate didn't matchhostname in certificate didn't match: <dl-ssl.google. ...

  9. Could not find com.android.support.constraint:constraint-layout的问题解决

    这几天使用android studio的各种坑之一: Error:Could not find com.android.support.constraint:constraint-layout:1.0 ...

随机推荐

  1. Sql Server查询视图和表

    SELECT obj.name tablename, CAST ( CASE WHEN (SELECT COUNT() FROM sys.indexes WHERE object_id= obj.OB ...

  2. MYSQL之You can't specify target table for update in FROM clause解决办法

    mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表( ...

  3. win7下安装双系统Ubuntu14.04后开机没有win7,直接进入Ubuntu

    开机进入Ubuntu后,打开命令端,输入: sudo update-grub 然后重启,则解决问题

  4. [Learn AF3]第五章 App Framework 3组件之Drawer——Side Menu

    Drawer——Side menu 组件名称:Drawer     说明:af3中的side menu和af2中有很大变化,af3中的side menu实际上是通过插件$.afui.drawer来实现 ...

  5. Hibernate的七种映射关系之七种关联映射(一)

    关联映射就是将关联关系映射到数据库里,在对象模型中就是一个或多个引用. 一.Hibernate多对一关联映射:就是在“多”的一端加外键,指向“一”的一端. 比如多个学生对应一个班级,多个用户对应一个级 ...

  6. SCXcodeSwitchExpander自动填充switch语句下枚举类型case

    下载地址:https://github.com/stefanceriu/SCXcodeSwitchExpander 跟VVDocumenter规范注释生成器的安装方式一样: 下载开源工程在Xcode重 ...

  7. 给NSMutableArray添加copy属性就变成了NSArray

    -copy, as implemented by mutable Cocoa classes, always returns their immutable counterparts. Thus, w ...

  8. [转]Android:Layout_weight的深刻理解

    http://mobile.51cto.com/abased-375428.htm 最近写Demo,突然发现了Layout_weight这个属性,发现网上有很多关于这个属性的有意思的讨论,可是找了好多 ...

  9. 图像中的artifacts

    artifacts 瑕疵 伪影(Artifacts) 伪影(Artifacts)-CT-基础术语 - 影像园 http://www.xctmr.com/baike/ct/c34b5413e305b45 ...

  10. Java如何取得当前程序部署的服务器的IP

    1.问题:之前使用InetAddress.getLocalHost().getHostAddress()时,在开发机测试可以得到192.168.0.18这样的IP.但部署到linux服务器以后, 这个 ...