android-ndk

Android C++ NDK : some shared libraries refuses to link in runtime

旧巷老猫 提交于 2020-06-29 04:40:49
问题 I'm trying to use a C/C++ TensorFlow Lite shared library for my project, and it succeeds. So I added a few more libraries, but lib_nnapi.so fails to link in runtime( System.loadLibrary ). If I remove that specific library, everything works fine. Using fetchelf to rename SONAME failed with cannot locate symbol error. Wrote CMakeLists.txt using Official Android ndk example. All library is located in the same directories. CMakeLists.txt cmake_minimum_required(VERSION 3.4.1) option(BUILD_WITH

Latest Android NDK (r21c)'s libbinder_ndk is missing several exported APIs

▼魔方 西西 提交于 2020-06-29 04:36:47
问题 I am interested in using the AServiceManager_get/addService() APIs that are made available via the NDK implementation of binder, libbinder_ndk . The sources for this can be found here for 10.0.0r30 - API29, and in your AOSP tree at: $SDK/frameworks/native/libs/binder/ndk/ However, the libbinder_ndk.so bundled with the latest r21c NDK does not have all of these APIs exported. Many are, but the get/add services endpoints are not available. The libbinder_ndk.so for API29 can be found at: $NDK

How to add new source file in CMakeLists.txt?

不羁岁月 提交于 2020-06-29 03:55:47
问题 I am creating a demo to read and write files through android NDK. I am using CMake and have CMakeLists.txt in my project with following content: # For more information about using CMake with Android Studio, read the # documentation: https://d.android.com/studio/projects/add-native-code.html # Sets the minimum version of CMake required to build the native library. cmake_minimum_required(VERSION 3.4.1) # Creates and names a library, sets it as either STATIC # or SHARED, and provides the

Getting source and destination must be different error while building project

你。 提交于 2020-06-27 11:49:10
问题 I am getting this error while building project. Trying to add a new library in android-studio. Is there anybody who has an idea basically I am trying to create a new library here. Options tried: Manually deleted build Invaildate cache/restart Gradle clean build cache Build->Clean Project But build is failing. Source C:\Users\abc\AndroidStudioProjects\Events\app\build\intermediates\cmake\debug\obj\armeabi-v7a\libnative-lib.so and destination C:\Users\abc\AndroidStudioProjects\Events\app\build

FFMPEG: convert a mp4 to mp3 using ffmpeg-android ndk

旧时模样 提交于 2020-06-27 10:49:25
问题 I want to convert a video file of mp4 format to audio file of mp3 format. It is simple through command line but i cannot find how can i convert it through jni . Not sure which library and which function to call. Any help regarding this issue would be much appreciated. 来源: https://stackoverflow.com/questions/15876974/ffmpeg-convert-a-mp4-to-mp3-using-ffmpeg-android-ndk

FFMPEG: convert a mp4 to mp3 using ffmpeg-android ndk

陌路散爱 提交于 2020-06-27 10:49:25
问题 I want to convert a video file of mp4 format to audio file of mp3 format. It is simple through command line but i cannot find how can i convert it through jni . Not sure which library and which function to call. Any help regarding this issue would be much appreciated. 来源: https://stackoverflow.com/questions/15876974/ffmpeg-convert-a-mp4-to-mp3-using-ffmpeg-android-ndk

Android NDK __android_log_print function and LogCat

▼魔方 西西 提交于 2020-06-24 21:20:46
问题 I have a function like __android_log_print(ANDROID_LOG_INFO, "HelloNDK!"); on my C code I wouldn't find that output on my LogCat. What kind of filter I need to setup by Log Tag, by Log Message, by Application Name, by Log Level...etc. 回答1: You don't find output because you have misused the function. The function has the prototype: int __android_log_print(int prio, const char *tag, const char *fmt, ...); So you must supply a "tag" as well as the format. For example __android_log_print(ANDROID

OpenCV with Android NDK Undefined References

久未见 提交于 2020-06-24 12:36:09
问题 I'm trying to use opencv on android (ndk only). I compiled the latest source of the git repository for armeabi. (Based on: Building_OpenCV4Android_from_trunk) But I'm getting this errors (with ndk-build): error: undefined reference to 'cv::Mat::deallocate()' error: undefined reference to 'cv::fastFree(void*)' error: undefined reference to 'cv::_OutputArray::_OutputArray(cv::Mat&)' error: undefined reference to 'cv::Mat::copyTo(cv::_OutputArray const&)' error: undefined reference to 'cv::Mat:

Gradle sync failed, NDK not configured, download it with SDK manager

冷暖自知 提交于 2020-06-24 04:39:56
问题 I am completely new to Android development and just installed Android Studio. I'm doing a very basic HelloGL2 exercise, and I opened up the HelloGL2.iml file. I tried running it, but it said that the gradle project sync failed and that the NDK is not configured. In the simplest terms (to a complete beginner in Android), how do I fix this? 回答1: disclaimer: I work on Android Studio With newer version (3.6+) of Android Gradle Plugin, please download with "NDK (Side by side)" option from the SDK

-fno-unwind-tables and -fno-asynchronous-unwind-tables does not work NDK clang++

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-23 14:09:00
问题 I'm compiling my C++ code using clang++ that comes with ndk21. I've set both compiler flags -fno-unwind-tables and -fno-asynchronous-unwind-tables but the number of entries in the unwind table do not reduce. I also checked by setting the opposite -funwind-tables and -fasynchronous-unwind-tables but it doesn't increase either. setting -fno-exceptions does reduce the number of entries slightly which makes me think I'm passing the flags correctly. Does anyone have any idea why this could be the