一身转战三千里,一剑曾百万师。这篇文章主要讲述android cannot locate symbol '
sigemptyset'
问题解决相关的知识,希望能为你提供帮助。
设备是android 4.1的平板电脑,支持armeabi-v7a和mips,为了能用上poco c++ lib,用cmake编译了poco mips架构的lib,但在android studio里引用运行时就报
cannot locate symbol ‘sigemptyset‘
【android 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:
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 |
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 addAPP_PLATFORM := android-19
to your
Application.mk
.推荐阅读
- Android 自己定义View学习
- Android捕获View焦点事件,LinearLayout结合HorizontalScrollView实现ViewPgaer和选项卡Tabs联动
- call 和 apply方法解析
- Android 主要控件
- 关于Android教学的思考1
- 使用Android design support library在Eclipse和Android Studio
- apply()
- Android onKeyDown 两次返回键退出
- android-继承BaseAdapter--自己定义适配器,getView运行多次的解决方法