android cannot locate symbol 'sigemptyset'问题解决

设备是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”


0down votefavorite

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'问题解决

时间: 2024-10-11 14:07:21

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

Android JNI之——UnsatisfiedLinkError errordlopen failed: cannot locate symbol "rand"

转载请注明出处:http://blog.csdn.net/l1028386804/article/details/46593083 E/dalvikvm(19498): dlopen("/data/app-lib/com.mystylinglounge.salonluatest-2/libcocos2dlua.so") failed: dlopen failed: cannot locate symbol "rand" referenced by "lib

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

ndk从r8升级到r10后, 使用eclipse编译出来的so库报错了,加载库的时候报错cannot locate symbol "atof" referenced by 原因:Android的stdlib.h中atof是内联的解决方法:将所有的atof改成strtod示例代码: char *strpi = "3.1415"; double dpi; dpi = atof(strpi); 修改为: dpi = strtod(strpi, NULL); 参考自:htt

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "srand" referenced by "libcocos2dcpp.so"...错误解决

在cocos2d-x 3.5中进行开发的时候,Android代码的编译可能会碰到如下错误:java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "srand" referenced by "libcocos2dcpp.so"... 解决这个问题的办法之一就是把ndk版本从r10d降为r9d,不过这并不是推荐的方法,因为r9d对C++ 11的正则表达式支持不够,以及一些其它的原因. 解决

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

原文链接:http://blog.csdn.net/acm2008/article/details/41040015 当用NDK编译的库在运行加载时报如下错: dlopen("/data/data/xxx.xxx.xxx/lib/libxxx.so") failed: dlopen failed: cannot locate symbol "__exidx_end" referenced by "libxxx.so"... 解决办法如下: 在你报

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

当用NDK编译的库在运行加载时报如下错: dlopen("/data/data/xxx.xxx.xxx/lib/libxxx.so") failed: dlopen failed: cannot locate symbol "__exidx_end" referenced by "libxxx.so"... 解决办法如下: 在你报错的库libxxx.so的编译脚本Android.mk请加上:LOCAL_LDFLAGS += -fuse-ld=bf

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

当用NDK编译的库在执行载入时报例如以下错: dlopen("/data/data/xxx.xxx.xxx/lib/libxxx.so") failed: dlopen failed: cannot locate symbol "__exidx_end" referenced by "libxxx.so"... 解决的方法例如以下: 在你报错的库libxxx.so的编译脚本Android.mk请加上:LOCAL_LDFLAGS += -fuse-

ios 中 使用自制framework导致 Duplicate symbol 的问题解决方法

使用第三方静态库的时候有时候要求在编译选项linker 中 other linker flag中加入 -ObjC 但如果自制的framework库工程中加入了-ObjC,在Demo工程中如果也加入-ObjC选项时,可能导致 duplicate sysbol的问题 duplicate symbol _OBJC_CLASS_$_ZHAlixPayResult in: /Users/zizhu/Library/Developer/Xcode/DerivedData/NtUniSdkHaiMaDemo-

转载:Eclipse build Android时不生成apk问题解决方法

Eclisps有时build后不生成apk.没有对Eclise做过设置调整,android工程代码也是没有问题的.反正就是莫名奇妙的遇到两次,解决方法如下: 1. 设置:Preferences -> Android -> Build中有一项“Skip packaging and dexing until export or launch....”,去除勾选状态 2. 删除debug.keystore,该文件位置: Preferences -> Android -> Build 下有

Android Studio 使用中遇到的问题解决

最近在使用as的过程中遇到了一个比较不常见的问题.花了比较多时间才解决,网上的资料也比较少,所以这里留个记录,方便自己也方便他人. 首先是问题描述: 在android开发中我们一定厌倦了不停的findViewById和setOnClickListener(),所以寻找一个偷懒的办法也是必然的,这里我使用了比较著名的ButterKnife框架,具体的使用方法有很多我也就不详细说,我要说的是在我使用了这个框架后,android studio构建的时候竟然告诉我编译出错了.错误的日志如下:@Bind-