NDK

How to use GraphicBuffer in android ndk

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am asking this with reference to an answer for my question at How to improve opengl es display performance in android . I was trying to build the code which uses GraphicBuffer with ndk-r9d. but It is saying GraphicBuffer is not declared in this scope. The same comments for eglCreateImageKHR and glEGLImageTargetTexture2DOES. I have added EGL/eglext.h and GLES2/gl2ext.h . I tried to include ui/GraphicBuffer.h but it is not taking it. Is there another header file to be added ? The code given below I have added to avoid use of glTexSubImage2D(

Android NDK: Why is AAssetManager_open returning NULL

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some code: AAsset* pAsset = AAssetManager_open(pAssetManager, "asset_test.txt", AASSET_MODE_STREAMING); DebugPrint(pAsset?"pAsset not NULL\n":"pAsset NULL"); if (pAsset) { char buf[1024]; AAsset_read(pAsset, buf, sizeof(buf)); DebugPrint(buf); AAsset_close(pAsset); } This code always prints "pAsset NULL" in logcat. I put the asset_test.txt file in my assets directory, and I looked in the .apk to make sure it exists by renaming the .apk to .zip and opening it with 7zip. I have some more code: AAssetDir* pAssetDir = AAssetManager

arm-linux-androideabi-gcc is unable to create an executable - compile ffmpeg for android armeabi devices

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to compile ffmpeg for android armeabi devices. I am following tutorial by roman10.net His given build script builds ffmpeg for armv7-a devices. I want to build it for armeabi. My ultimate aim is to run ffmpeg commands on android armeabi and armv7-a devices. So I change the script's CPU part from #arm v7vfpv3 CPU=armv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU " PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= build_one to #arm v6 CPU=armv6 OPTIMIZE_CFLAGS="-marm -march=$CPU" PREFIX=./android/$CPU

How to add git credentials to the build so it would be able to be used within a shell code?

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've wrote the following Jenkinsfile: node ( "master" ) { def artifactory_creds = 'XXXXXXX' def git_creds = 'XXXXXXX' java = docker . image ( 'openjdk:8-jdk' ) java . pull () java . inside ( "-u root --ulimit core=99999999" ) { withCredentials ([ // Use Jenkins credentials ID of artifactory [ $class : 'UsernamePasswordMultiBinding' , credentialsId : artifactory_creds , usernameVariable : 'A_USER' , passwordVariable : 'A_PASS' ], [ $class : 'UsernamePasswordMultiBinding' , credentialsId : git_creds , usernameVariable : 'G_USER' ,

Android NDK: How to get compiler architecture in Android.mk dynamically

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to configure Android.mk to cross compile native code to support different chipset namely armeabi, mips, and x86. I know I can configure Application.mk in the following way to compile the source code for different chip set: APP_ABI := all This will trigger Android-NDK's build script to compile the source code for all the chipsets. However, I want to dynamically tell Android.mk to look for different static library dependencies compiled with different chip set. # Get the architecture info ARCH := ???? include $(CLEAR_VARS) LOCAL

Android 4.2 ndk: library loading crash: load_library(linker.cpp:750) || soinfo_link_image || libhoudini.so || opencv

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using a native library that includes opencv. The library builds well and works well in all devices and emulators, but not on Android 4.2 ones. It crashes on System.loadLibrary("mylib"); . The library is built for armeabi-v7a armeabi x86 mips (I see in the jnilibs folder that all the so files were generated) I am stuck on this bug because I couldn't find any answer on the internet which could explain my problem. Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libopencv_java.so" , log trace: 1755-1755/com

Android NDK: Missing LOCAL_MODULE before including BUILD_SHARED_LIBRARY

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to setup a test NDK project in Eclipse/ADT following this tutorial . I've created a fresh new Android project "Test1", in which I've added these 2 files: c:\Workspace\Test1\jni\Android.mk c:\Workspace\Test1\jni\ndkfoo.c This is in Android.mk : But when I try to compile it, I get this error: c:\Workspace\Test1\jni>ndk-build c:/android-ndk-r10d/build/core/build-shared-library.mk:23: *** Android NDK: Missing LOCAL_MODULE before including BUILD_SHARED_LIBRARY in c:/Workspace/Test1//jni/Android.mk . Stop. But I do have a clause in

Android NDK r10d error

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to compile some media library which uses some part of ffmpeg. I'm having following errors: /home/pro/android-ndk-r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: conditional branch to PLT in THUMB-2 not supported yet. libavcodec/arm/videodsp_armv5te.S:29: error: unexpected opcode while processing relocation R_ARM_THM_JUMP19 clang++: error: linker command failed with exit code 1 (use -v to see invocation) Application.mk file APP_STL :=

Android NDK socket connect() returning 0 when it should fail whilst on 3g

匿名 (未验证) 提交于 2019-12-03 00:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have written a socket in the android NDK and a server in c. It is able to connect to the server fine. However if the server is down or I try to get it to connect to a different random IP the call to connect still returns 0 when it should return -1. Here is the code for the client: #include <stdio.h> #include <jni.h> #include <netdb.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <android/log.h> #include <unistd.h> #define APPNAME "MyApp" #define logcat(...) __android_log_print(ANDROID_LOG_VERBOSE, APPNAME

skia android编译错误解决

匿名 (未验证) 提交于 2019-12-03 00:34:01
编译的时候,总是提示SkImageDecoder.h头文件出错, 就是要更新一下依赖库, 然后重新 python tools / git - sync - deps后 重新编译bin\gn.exe gen out/armv7 --args="is_debug=false ndk=\"E:/android/android-ndk-r16b\" target_cpu=\"arm\"" 然后ninja -C out\armv7即可。 文章来源: skia android编译错误解决