android-ndk

Compiling C++11 sources for Android NDK

家住魔仙堡 提交于 2020-06-22 22:52:10
问题 I'm trying to compile some C++11 sources with Android NDK on Windows, but without much luck. Please note, that I've read some other questions about compiling C++11, but they didn't help much unfortunately. I've downloaded the ADT Bundle and latest NDK ( android-ndk-r9b-windows-x86.zip ). These are my configuration files: Application.mk APP_STL := gnustl_static NDK_TOOLCHAIN_VERSION = 4.8 LOCAL_CPP_FEATURES += exceptions LOCAL_CFLAGS += -std=c++11 Android.mk LOCAL_PATH := $(call my-dir)

Write error: Invalid argument, when file is opened with O_DIRECT

南笙酒味 提交于 2020-06-18 08:34:07
问题 it is very important to me to write to a file with the O_DIRECT flag. This is how I open the file: //Open the file int fd; if((fd = open(inFilepath, O_WRONLY | O_CREAT |O_SYNC |O_DIRECT,S_IRUSR|S_IWUSR))<0) { //Error handling return; } I know about O_DIRECT's alignment restrictions. This is why I initialize my buffer with calloc: char *buff = (char *) calloc((size_t) 1,sizeof(char)); if(write(fd,buff,(size_t)1)<1) { //Error logging free(buff); return -1; } And I get the write: Invalid

Write error: Invalid argument, when file is opened with O_DIRECT

房东的猫 提交于 2020-06-18 08:32:29
问题 it is very important to me to write to a file with the O_DIRECT flag. This is how I open the file: //Open the file int fd; if((fd = open(inFilepath, O_WRONLY | O_CREAT |O_SYNC |O_DIRECT,S_IRUSR|S_IWUSR))<0) { //Error handling return; } I know about O_DIRECT's alignment restrictions. This is why I initialize my buffer with calloc: char *buff = (char *) calloc((size_t) 1,sizeof(char)); if(write(fd,buff,(size_t)1)<1) { //Error logging free(buff); return -1; } And I get the write: Invalid

MSI SDR device sample code does not compile

蓝咒 提交于 2020-06-17 06:20:38
问题 I am trying to interface with an MSI SDR dongle, using an android app This device is a clone of the SDRPlay SDR device, and is compatible with it's software and drivers I am trying to interface with this using an OTG cable and android phone The android drivers for this can be downloaded from here https://www.sdrplay.com/downloads/ It is in the Android tab under the API/HW – V2.11 (15TH NOV 2017) link (https://www.sdrplay.com/anddl.php) A possible sample code for this driver can be found here:

How to call Strace native library in Android application?

爱⌒轻易说出口 提交于 2020-06-17 00:50:10
问题 I am developing an android application where I imported Strace for Android which contains .c files, shown in the image below. All the .c files are added automatically in the cpp folder when i gave the path of Android.mk file. the Android.mk file is given in this link and MainActivity.java is as follows: The problem is that when I give the name of starce.c as the native library the application stops unexpectedly. Anyone knows why this is happening? Thanks in advance 来源: https://stackoverflow

Using C/C++ Library on Android

余生长醉 提交于 2020-06-15 06:16:17
问题 I have coded a library that provides some function add, sub, divide, multi by c/c++ programming language. It's built to library.so by using Android NDK. So now, I want to call these function of library by using Android. I want to as How I can do ? Thank. 回答1: NDK Package Android Studio only includes the default tools and SDK, so download and install the NDK package separately. There are two ways to do this. The first and easiest is the automatic installation option in the SDK Tools tab. This

Android NDK: no archive symbol table (run ranlib)

蓝咒 提交于 2020-06-14 06:18:57
问题 I am updating my projects to use Android ndk 16b and it was previously using 12b (was working fine). After I updated, I am running into the following error while building the final .so: /Users/ssk/code/client/git/thirdparty/android-ndk-r16b/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: jni/../../../shared-library/SharedCommon/build/arm-linux-androideabi/lib/libSharedCommon.a: no

Android NDK: no archive symbol table (run ranlib)

廉价感情. 提交于 2020-06-14 06:12:33
问题 I am updating my projects to use Android ndk 16b and it was previously using 12b (was working fine). After I updated, I am running into the following error while building the final .so: /Users/ssk/code/client/git/thirdparty/android-ndk-r16b/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: jni/../../../shared-library/SharedCommon/build/arm-linux-androideabi/lib/libSharedCommon.a: no

How do i add openssl library in android studio? [closed]

本小妞迷上赌 提交于 2020-06-01 05:36:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 days ago . I want to implement AES and RSA encryption in my project using ndk(not using java API).by brief study i coming to know that i need to add openssl for achieving my task. i downloaded library from here openssl. but that contains plenty of files. i am confused what to do with that.is

Where is Android.mk supposed to be?

僤鯓⒐⒋嵵緔 提交于 2020-05-25 17:10:40
问题 In the documentation for Android NDK, the following statement is present: The Android.mk file resides in a subdirectory of your project's jni/ directory [...] http://developer.android.com/ndk/guides/android_mk.html I can interpret from this that an Android.mk file should be placed in [project_path]/jni/[module_name]/Android.mk , each module having its own specific Android.mk file since this is what differentiates it from the application wide Application.mk file, but when I execute ndk-build I