设备是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. linux stat命令参数及用法详解

    功能说明:显示inode内容.语 法:stat [文件或目录]补充说明:stat以文字的格式来显示inode的内容. ls 命令及其许多参数提供了一些非常有用的文件信息.另一个不太为人所熟知的命令 s ...

  2. Java实践 — SSH远程执行Shell脚本

    1. SSH简介         SSH是Secure Shell的缩写,一种建立在应用层和传输层基础上的安全协议.SSH在连接和传送过程中会加密所有数据,可以用来在不同系统或者服务器之间进行安全连接 ...

  3. Ubuntu 安装IntelliJ IDEA

    1. 下载IDEA    官网地中:http://www.jetbrains.com/idea/download/index.html    选择对应操作系统的版本.下载后,我的文件名称为: idea ...

  4. 查看CentOS系统运行了多久使用uptime命令

    对于一些人来说系统运行了多久是无关紧要的,但是对于服务器管理员来说,这是相当重要的信息. 服务器在运行重要应用的时候,必须尽量保证长时间的稳定运行,有时候甚至要求零宕机. 那么我们怎么才能知道服务器运 ...

  5. MATLAB:读取mat文件中物体的三维坐标,显示三维模型

    在MATLAB中建立一个脚本show3Dmat.m文件,编写代码: clc; clear; %%read 3D data load('E:\博士\深度学习与三维重建\代码实现\3DRecGAN\X_Y ...

  6. java中获取文件目录

    1. web项目得到部署的目录路径(最后包含"/"或"\"): xxx(HttpServletRequest request) { String strDirP ...

  7. shiro实现动态权限管理

    用到shiro框架实现权限控制时,根据实际要求,权限在数据库增删改后都要把权限过滤链变化实时更新到服务器中. 1.配置文件里配置的filterchains都是静态的,但实际开发中更多的是从数据库中动态 ...

  8. VC设置cookies实现文件刷下载量

    VC设置cookies实现文件刷下载量 VC设置cookies实现文件刷下载量 分类: c/c++2013-10-11 17:22 250人阅读 评论(0) 收藏 举报   目录(?)[+]   同学 ...

  9. 性能监控-TP理解

    首先给出Google到的答案: The tp90 is a minimum time under which 90% of requests have been served. tp90 = top ...

  10. RMAN:简单的duplicate创建新数据库

    duplicate to "test" backup location '/home/oracle/11.2.0.4/assistants/dbca/templates/'; du ...