android-ndk

How to fix process_begin: CreateProcess(NULL, “”, …) failed error

旧城冷巷雨未停 提交于 2021-02-08 09:51:08
问题 I am trying to run this project phimp.me.I have used c++_static as per the new document mentioned in android supporting C++ library , still it throws the same error. I have tried cleaning and rebuilding the project, replacing c++_static with c++_shared but its throws the same error. Also I tried renaming the OpenCV.mk file to OpenCVX86.mk file as per one link. I have rechecked and downloaded NDK and CMake from SDK Tools but its stuck with the same error. Android.mk file LOCAL_PATH := $(call

How to fix process_begin: CreateProcess(NULL, “”, …) failed error

落爺英雄遲暮 提交于 2021-02-08 09:51:03
问题 I am trying to run this project phimp.me.I have used c++_static as per the new document mentioned in android supporting C++ library , still it throws the same error. I have tried cleaning and rebuilding the project, replacing c++_static with c++_shared but its throws the same error. Also I tried renaming the OpenCV.mk file to OpenCVX86.mk file as per one link. I have rechecked and downloaded NDK and CMake from SDK Tools but its stuck with the same error. Android.mk file LOCAL_PATH := $(call

Android NDK: libc++ support for hard-float

余生颓废 提交于 2021-02-08 07:58:29
问题 I am running into problems when compiling a small Java program that uses several custom c++ libraries. All the libraries are targeting armeabi-v7a and are compiled with hard-float support (mfloat-abi=hard -mfpu=neon -mhard-float -D_NDK_MATH_NO_SOFTFP=1). I have couple of other cpp files that are part of the Java/Android project; those are also compiled with the above settings and I link against libm_hard.a (instead of libm.a) When I run the program, I am getting strange behavior with floats

Android Studio | CPP file errors error: undefined reference to 'AndroidBitmap_unlockPixels' In bitmap library

我的未来我决定 提交于 2021-02-08 07:36:13
问题 I'm trying to use AndroidJniBitmapOperations library. But I'm a Junior Dev, with no knowledge in the NDK, JNI world. I succeed to resolve a few errors like 'UnsatisfiedLinkError', but Now I'm getting a new one when I trying to build: error: undefined reference to 'AndroidBitmap_unlockPixels' Also I get a few errors inside the CPP file: 1."Incorrect type for parameter 'prarmeterName', which should have type 'jint'. 2."Add extern 'C'" But I don't sure if the last 2 are important. Help me to

Android Studio | CPP file errors error: undefined reference to 'AndroidBitmap_unlockPixels' In bitmap library

♀尐吖头ヾ 提交于 2021-02-08 07:33:32
问题 I'm trying to use AndroidJniBitmapOperations library. But I'm a Junior Dev, with no knowledge in the NDK, JNI world. I succeed to resolve a few errors like 'UnsatisfiedLinkError', but Now I'm getting a new one when I trying to build: error: undefined reference to 'AndroidBitmap_unlockPixels' Also I get a few errors inside the CPP file: 1."Incorrect type for parameter 'prarmeterName', which should have type 'jint'. 2."Add extern 'C'" But I don't sure if the last 2 are important. Help me to

How to use external jar like jsoup library in android framework [AOSP] java files (NOT Android Studio or Java IDE)

拥有回忆 提交于 2021-02-08 05:44:45
问题 I wish to use jsoup library in Android Open Source Project. For this I did two things:- Step 1: Made a directory jsoup in common as follows: [android]prebuilts/misc/common/jsoup/ In this jsoup folder I added jsoup-1.13.1.jar downloaded from : https://jsoup.org/download In this same jsoup folder I added another file Android.mk {as it is name and code below:} LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := jsoup LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := jsoup-1.13.1

How to put an image into a MAT in openCV, through the android NDK (c++)

放肆的年华 提交于 2021-02-07 20:25:23
问题 I'm using OpenCv through the Android NDK (using c++) I would like to save an image into MAT format and then display it on my android application. I have saved the image in assets. imread() does not work in the NKD because it cannot find the file path to the image, however, I can use AssetManager to load an asset and it finds the path perfectly. This method saves the data into a char* buffer. How can I, either use something similar to imread() to save the image into a MAT, or convert the char*

Set Android.mk flag through Gradle depending on build type

故事扮演 提交于 2021-02-07 20:01:25
问题 I need to set a flag inside Android.mk file which tells to the C code whether it's debug mode or not. LOCAL_MODULE := auth LOCAL_SRC_FILES := auth.c LOCAL_CFLAGS := -DDEBUG_MODE=0 LOCAL_EXPORT_CFLAGS := $(LOCAL_CFLAGS) LOCAL_LDLIBS := -llog LOCAL_C_INCLUDES := auth.h include $(BUILD_SHARED_LIBRARY) The problem is that I often forget to change the value when building a release and viceversa so I'm looking forward to a way that does it automatically. I tried changing Android.mk to: LOCAL_CFLAGS

Android Studio with NDK : link error : undefined reference to 'stderr'

五迷三道 提交于 2021-02-07 04:22:09
问题 I've compiled OpenCV static libraries targeting android armeabi-v7a. Now I'm trying to link my native C++ code with those libraries through a CMakeLists.txt file in Android Studio but this fails with this weird error : ~/opencv/modules/videoio/src/container_avi.cpp:0: error: undefined reference to 'stderr' This code comes from the libopencv_videoio.a The interresting part of the CMakeLists.txt file is this # linking with static libraries target_link_libraries(native-lib dnn ml objdetect shape

Low-level USB API on Android at NDK level to use on Qt Android

无人久伴 提交于 2021-02-06 06:26:40
问题 I need to interact with an HID device on Android. The problem is that i'm using Qt Android, and i'm not using Java UsbManager classes. Is there any C lib which I can link against in order to communicate with an HID device on Android without having to work with the Java API? I have found this: http://source.android.com/devices/reference/bt__hh_8h_source.html Which seems to be an header that defines HID communication but I can't find the associated lib. Any ideas? Thanks in advance 回答1: I have