设备是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. zabbix 配置SNMP监控

    什么是SNMP? 简单网络管理协议(SNMP),由一组网络管理的标准组成,包含一个应用层协议(application layer protocol).数据库模型(database schema)和一组 ...

  2. 解决 PathVariable annotation was empty on param 0.

    今天在写网关关于远程调用Feign的时候报的一个错误,PathVariable注解为空.仔细看了一下代码发现问题出在用@PathVariable注解的时候 @PathVariable Integer ...

  3. 关于js中namespace命名空间模式

    命名空间有助于减少程序中所需要的全局变量的数量,并且同时有助于避免命名冲突或过长的名字前缀. 关于命名空间的例子: /** * 创建全局对象MYAPP * @module MYAPP * @title ...

  4. Nginx防盗链 Nginx访问控制 Nginx解析php相关配置 Nginx代理

     

  5. 【Intel AF 2.1 学习笔记二】AF中的页面——Panel

    Panel Panel控件是你的app中的独立内容的区域控件.它是af UI的核心.Panel div 元素实际上承载了app中你管理和显示的界面元素和内容. 创建panel控件是相当地容易的:在id ...

  6. NSNull, Nil, nil, NULL区别(OC)

    参考:http://nshipster.com/nil/ 直接给个表吧 Symbol Value Meaning NULL (void *)0 literal null value for C poi ...

  7. Android学习之——实现圆角Button

    在drawable文件夹下新建btn_shape.xml文件: <?xml version="1.0" encoding="utf-8"?> < ...

  8. 4 云计算系列之Openstack简介与keystone安装

    preface KVM 是openstack虚拟化的基础, 再介绍了kvm虚拟化技术之后,我们介绍下openstack和如何搭建. Openstack组件 openstack架构图如下所示 那么我们就 ...

  9. Postman测试api@RequestBody接收参数

    api postman 结果 { , "message": "Content type 'multipart/form-data;boundary=----------- ...

  10. Python 和C#的交互

    IronPython是一个.NET平台上的Python实现,包括了完整的编译器.执行引擎与运行时支持,能够与.NET已有的库无缝整合到一起. IronPython已经很好的集成到了.NET frame ...