Category : android-ndk

When using my library on Android I get a null pointer dereference error when calling the lock function on a unique_pointer. I do not get this error when using it on iOS. Snippets of the troubled code is as follows: foo.hpp std::mutex bundlesMutex; foo.cpp void somefunction(std::uint8_t blah) { std::unique_lock<std::mutex> bundlesLock(bundlesMutex, std::defer_lock); //do stuff bundlesLock.lock(); //crash ..

Read more

I have been dealing with this issue for a couple of days now. I Built the .so library using cmake under visual studio using the fallowing settings: CMakeList.txt: cmake_minimum_required (VERSION 3.8) set(ANDROID_STL c++_static) set(CMAKE_TOOLCHAIN_FILE C:/Microsoft/AndroidNDK/android-ndk-r21d/build/cmake/android.toolchain.cmake) project("GetValsDudeLib"). So far I have been unable to find any examples online set(CMAKE_SYSTEM_PROCESSOR x86) set(CMAKE_ANDROID_ARCH arm) set(CMAKE_SYSTEM_NAME ANDROID) set(CMAKE_ANDROID_NDK "C:/Microsoft/AndroidNDK/android-ndk-r21d") ..

Read more

I have been dealing with this issue for a couple of days now. I Built the .so library using cmake under visual studio using the fallowing settings: CMakeList.txt: cmake_minimum_required (VERSION 3.8) set(ANDROID_STL c++_static) set(CMAKE_TOOLCHAIN_FILE C:/Microsoft/AndroidNDK/android-ndk-r21d/build/cmake/android.toolchain.cmake) project("GetValsDudeLib"). So far I have been unable to find any examples online set(CMAKE_SYSTEM_PROCESSOR x86) set(CMAKE_ANDROID_ARCH arm) set(CMAKE_SYSTEM_NAME ANDROID) set(CMAKE_ANDROID_NDK "C:/Microsoft/AndroidNDK/android-ndk-r21d") ..

Read more

opencv has been setup in my project but the imported c++ files are giving error FAILURE: Build failed with an exception. What went wrong: Execution failed for task ‘:app:externalNativeBuildDebug’. Build command failed. Error while executing process C:srcAndroidSdkcmake.10.2.4988404binninja.exe with arguments {-C C:Usersazad prajapatAndroidStudioProjectssunscapesunscapeandroidapp.cxxcmakedebugarmeabi-v7a native-panorama} ninja: Entering directory `C:Usersazad prajapatAndroidStudioProjectssunscapesunscapeandroidapp.cxxcmakedebugarmeabi-v7a’ [1/2] Building CXX object CMakeFiles/native-panorama.dir/src/main/jni/com_example_sunscape_NativePanorama.cpp.o FAILED: CMakeFiles/native-panorama.dir/src/main/jni/com_example_sunscape_NativePanorama.cpp.o ..

Read more

I’m building an Android App, which obtains frameset (com.intel.realsense.librealsense.FrameSet) in android java code, then passes the frameset to some existing C++ code for further processing. The C++ processing function takes argument of rs2::frameset. My question is: How to pass the Java com.intel.realsense.librealsense.FrameSet object to C++ code, obtaining a C++ rs2::frameset object so I can use ..

Read more