android-ndk

Android NDK Cannot load library: reloc_library[1306]

点点圈 提交于 2019-12-24 15:22:08
问题 Im developing an android app thats loading two shared libraries. One is external, its called libpcan.so . Usually its build to libpcan.so.0.6, this somehow cant be used by my android, i so changed the gcc flags compiling it from: arm-linux-androideabi-gcc src/libpcan.c -fPIC -shared -O2 -Wall -Wl,-soname,-libpcan.so.0 -lc -I. -I../driver -DNO_RT -o -libpcan.so.0.6 ln -sf libpcan.so.0.6 libpcan.so to arm-linux-androideabi-gcc src/libpcan.c -fPIC -shared -O2 -Wall -lc -I. -I../driver -DNO_RT -o

Build native library in JNI folder?

心不动则不痛 提交于 2019-12-24 15:21:13
问题 I'm testing JNI on Android in Eclipse. I have a simple Android project with one activity. In Eclipse's project explorer, I added: jni/ folder Android.mk in the jni/ folder prng.c in the jni/ folder The source file is named prng.c because it wraps Crypto++'s random number generator. Crypto++ is already cross-compiled for ARMv7, so I have libcryptopp.so standing by. When I select Project → Build Project , the library is not built. I've confirmed its not built after cleaning the project, too.

Migrating Eclipse android project with NDK and Gstreamer usage to Android Studio

假装没事ソ 提交于 2019-12-24 15:00:21
问题 I have a perfectly working android project in Eclipse, the project includes NDK support and uses Gstreamer. When I migrate the project from Eclipse to Android Studio all sorts of problems pop up, and I just cant successfully compile the project. I did a thorough research on each and every error I've encountered but still couldn't compile and run the project on android studio. https://drive.google.com/file/d/0B_euzgSjTAqcQngwbzR1cXY0MkU/view?usp=sharing A link to the working Eclipse project, I

Is Renderscript incompatible with NDK libraries in the same project?

谁说我不能喝 提交于 2019-12-24 14:15:32
问题 I have a problem creating an Android app that makes use of both Renderscript and native code generated with NDK. Substantially, I use NDK tools to generate a library called sprstr_native.so . I managed to call their C++ functions through Java code without problems. Then I needed some Renderscript functionalities (in particular, ScriptIntrinsicYuvToRGB ) so I've added to my Eclipse project a reference to the relative support library, renderscript-v8.jar , and this line in the project

Two finger rotation for OSMdroid mapview

半城伤御伤魂 提交于 2019-12-24 13:44:08
问题 I'm trying to make two finger rotation for my offline maps using osmdroid. I'm new to using maps for android. I have a geoTIFF, I'm planning to extract info using NDK and later send it to JAVA. I need to use the geoPoint to align with True North Up using compass as well. How can I proceed, any help? I did try this: Android Two finger rotation example, but no luck, my app was not able to detect any two finger event. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate

Unable to auto-config arch from toolchain

☆樱花仙子☆ 提交于 2019-12-24 13:42:01
问题 I'm trying to configuration toolchain in Cygwin for Android NDK. I use of this tutorial. when I run the following command: ./make-standalone-toolchain.sh --platform=android-9 --install-dir=c:/android-toolchain --ndk-dir=c:/android-ndk-r10d/ It shows "Unable to auto-config arch from toolchain" How can I fix problem? 回答1: You have to specify which toolchain you want, add a toolchain flag, for instance for arm-linux-androidabi-4.6 toolchain: ./make-standalone-toolchain.sh --toolchain=arm-linux

ndk-build throwing error relating to libcrypto.so

我是研究僧i 提交于 2019-12-24 13:41:51
问题 I don't know where to start with this, so let me know if you need anything else. Thanks. I am using ndk-build to build a native component for my Android project. $ ndk-build -v GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for x86_64-apple-darwin I am getting this when I run ndk-build (just the errors are

core dump addresses not byte aligned

萝らか妹 提交于 2019-12-24 13:17:24
问题 I was examining some ARM crashes on Android and realised some memory addresses positions are not 2-byte aligned (THUMB/ARM) but some are. Does any one know why is that so? Here is an example tombstone: Stack frame #00 pc 00072c9a /system/lib/libdvm.so (dvmAbort+170) Stack frame #01 pc 00050f6b /system/lib/libdvm.so (ScopedCheck::checkInstanceFieldID(_jobject*, _jfieldID*)+379) Stack frame #02 pc 0005db56 /system/lib/libdvm.so (Check_SetBooleanField(_JNIEnv*, _jobject*, _jfieldID*, unsigned

Android Studio 2.0's inline compiler does no longer recognize native code

╄→尐↘猪︶ㄣ 提交于 2019-12-24 12:33:04
问题 I am currently working on a library that contains Java and native code. The build works well, and so does the execution of the code when this lib is used by a client application. But the inline compiler of Android Studio 2.0 beta 2 does no longer recognize my NDK code properly (while this was OK with Studio 1.5): All natives appear red in the Java code while they are properly mapped through JNI_OnLoad() : The whole C code is highlighted in red as Studio cannot find the includes and symbols: .

Native Activity vs SDK Activity in terms of U.I

核能气质少年 提交于 2019-12-24 12:15:47
问题 I've been doing a fair amount of research, and have even experimented some with the NDK for Android (not so much the SDK). What I haven't been able to really find though is a clear and concise definition for what the NDK cannot do (besides lack of exception handling and rtti). I've been mapping out some code for a game and a game engine for Android (Written entirely in the NDK) but it seems to not be as supported as many would like it to be. Not only that, but I'd like to be able to give my