NDK

ndk.dir error in Android Studio

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was trying to use opencv library, so I imported one of its projects in Android Studio and when I tried to run it I got this error: Error:Execution failed for task ':openCVSamplefacedetection:compileDebugNdk'. NDK not configured. Download the NDK from http://developer.android.com/tools/sdk/ndk/.Then add ndk.dir=path/to/ndk in local.properties. (On Windows, make sure you escape backslashes, e.g. C:\ndk rather than C:\ndk) So I downloaded the ndk and I addes this line to the local.properties file where it became: sdk.dir=C\:\\Users\\skoon\

libjpeg-turbo for android

匿名 (未验证) 提交于 2019-12-03 02:28:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need libjpeg-turbo for android ndk. Did anyone managed to compile it as .a (static) lib? I have tried a few times, but it gave me a lot of errors only. 回答1: Install Android NDK . Following instructions were verified with r8b , older versions may have problems, I don't know. Get the Android sources for libjpeg-turbo from Benjamin Gaignard: git clone git://git.linaro.org/people/tomgall/libjpeg-turbo/libjpeg-turbo.git -b linaro-android In the libjpeg-turbo directory created by git , edit file Android.mk : after line 70, LOCAL_MODULE :=

Re-use code Android NDK

匿名 (未验证) 提交于 2019-12-03 02:21:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I found a lot of tutorials showing how to start developing Android Applications using NDK. But I have a rather "easy/stupid" question: Please consider the following two tutorials: http://mobile.tutsplus.com/tutorials/android/ndk-tutorial/ http://www.indiedb.com/tutorials/creating-compiling-and-deploying-native-projects-from-the-android-ndk http://mindtherobot.com/blog/452/android-beginners-ndk-setup-step-by-step/ http://marakana.com/forums/android/examples/49.html Now, in the second tutorial they are building the hello-jni example. My

Compiling the latest OpenSSL for Android

匿名 (未验证) 提交于 2019-12-03 02:18:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to generate the shared library for the (.so) files of the OpenSSL1.0.1c for the Android. I found that they have added three options for compiling for the Android in the android script. ./Configure android-armv7 (or) ./Configure android-x86 (or) ./Configure android once I configured for the OS and then try to compile, its throwing errors. Currently I am working x86 windows7 and installed Cygwin, Android sdk R20, Android NDK r8 sh-4.1$ make making all in crypto... make[1]: Entering directory `/cygdrive/d/SourceCodes/OpenSSL/openssl

Android linker: undefined reference to bsd_signal

匿名 (未验证) 提交于 2019-12-03 02:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm running gradlew to compile an Android app that has a static lib dependency. Somehow, I have an undefined reference to bsd_signal . I was able to compile this app with gradle 1.X, but I've been obliged to switch to gradle 2.10 and to drop my Android.mk file in favour of putting more build instruction into my gradle.build file, and this is where the trouble arises. Can anyone tell me whether there is a library that defines bsd_signal , which I should link to my project? Compiler output Starting process 'command '/home/myself/Android/Sdk

Android NDK: getting the backtrace

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm developing the native application that works with Android via the NDK. I need to call the backtrace() function when there is a crash. The problem is that there is no <execinfo.h> for the NDK. Is there any other way to get that back trace? 回答1: backtrace() is a non-standard Glibc extension, and even then somewhat shaky on ARM (you need to have built everything with -funwind-tables , I think, and then have a somewhat new Glibc?) As far as I know, this function is not included in the Bionic C library used by Android. You could try pulling

Android NDK and Google Play filtering

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The Google Play appstore automatically filters your application to devices with compatible CPU architecture. E.g. if you have a library which is only compiled for ARMv5, your app will only show up for devices with ARMv5 or ARMv7 processors. What if I have a Java alternative, and want my app to be downloaded by non-ARM devices too? E.g. I catch an exception when trying to load the external library, and implement a workable alternative in Dex bytecode (Java). When I upload the .apk, the Android Developer Console says: "This apk

Android Video Player Using NDK, OpenGL ES, and FFmpeg

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Ok so here is what I have so far. I have built FFmpeg on android and am able to use it fine. I have been able to load a video into FFmpeg after passing the chosen filename from the java side. To save on performance I am writing video player in the NDK rather than passing frames from FFmpeg to java through JNI. I want to send frames from the video to an OpenGL surface. I am having trouble figuring out how to get each frame of video and render it onto the OpenGL surface. I have been stuck trying to figure this out for a couple weeks

Android NDK mmap call broken on 32-bit devices after upgrading to Lollipop

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to grab 784 MiB of memory. Yes, I know that is a lot for a 32-bit phone, but the following call worked before Android 5.0: mmap(0, 0x31000000, PROT_NONE, MAP_ANON | MAP_SHARED, -1, 0); However, on three different devices from different manufacturers, upgrading to Android 5.0 has broken this. I assume this is some change in memory allocation functionality in 5.0; maybe different flags need to be passed in? Here's the error message returned in logcat: E/libc: mmap fail (pid 9994, tid 10125, size 822083584, flags 0x21, errno 12(Out

Android NDK UnsatisfiedLinkError - a surprising reason

匿名 (未验证) 提交于 2019-12-03 01:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Update 8/7/2013: The problem is solved now, but the reason for the error was quite unexpected, all the usual suspects for such errors were eliminated on start, and I have learned something new. See my answer below. I'm pretty desperate here. Have an Android app with a native library, from where I call a method. No problem on all the systems I tested, and the program was out in Google Play without any trouble reports, used by thousands of users. Now, apparently a new ROM - Android version 4.2.2 - for HTC One phone is out. Users claim that it