Questions tagged [android-native-library]
134 questions
1
vote
2 answers
AndroidJavaClass/AndroidJavaObject causing built application to crash
I have an Android application that builds and runs find before the introduction of the following code to an object in my scene. My goal was to vibrate at different lengths for my application instead of just using the default Handheld.Vibrate()…

A.Crane
- 435
- 1
- 3
- 12
1
vote
0 answers
VS2019 Android - reference additional libraries (*.so)
There is a native Android (c++) library project within a VS2019 solution. The project references some libraries (*.so) in order to be built.
The project is built successfully when libraries are in the project folder. However, if they are in a…

dajuric
- 2,373
- 2
- 20
- 43
1
vote
2 answers
Passing Custom Java Data Models to my Native Code
I think I have an idea of what to do, I just wanted to poke the SO community to see if I'm on the right track as I haven't seen any information about this specific topic from my research.
I have some custom Java (data model) classes that I want to…

Matt Strom
- 698
- 1
- 4
- 23
1
vote
0 answers
Issues with loading a native libary that depends on another native library that was loaded dynamically on Android
No comments about security concerns please, this is a very specific use case.
I am building an Android app that has two native libraries. We'll call them libFooA.so and libFooB.so. Now, libFooA.so is bundled inside the APK. However, it depends on…

You'reAGitForNotUsingGit
- 895
- 7
- 28
1
vote
1 answer
Using native library in external classes loaded dynamically (with reflection)
In my application, I'm using DexClassLoader to load a class of an external apk as follow:
DexClassLoader dexClassLoader = new DexClassLoader("path/to/someApkfile.apk", myOptimizedDirectory, null, myContext.getClassLoader());
Class> MyClass = …

amrezzd
- 1,787
- 15
- 38
1
vote
0 answers
How do I use precompiled C libraries on a non-rooted device through Android Studio?
I cross compiled a C library for Android. I copied the bin folder files to the Android xbin directory on a rooted device and I was able to use the library's commands. Can I do the same on a non rooted device through Android app/Android studio? I…

Doha
- 325
- 2
- 13
1
vote
1 answer
C++11 support in NativeLibrary for Android
I'm trying to create a native library in C++, which I can use in Android.
I've created a project in Visual Studio 2017: Dynamic Shared Library (Android), and added my cpp code.
Though some of the code is running C++11, and I'd really like to keep…

Benjamin Larsen
- 560
- 1
- 7
- 21
1
vote
1 answer
Skype for business android SDK issue, Failed to load native library
I am trying to implement an app using Skype for Business Android SDK's
this is the document that helps to configure the SDK, which didn't help me integrating the aar files.
https://msdn.microsoft.com/en-us/skype/appsdk/gettingstarted
so, i…

Veer3383
- 1,785
- 6
- 29
- 49
1
vote
1 answer
How are shared libraries packed into apk?
I'm working on some script for custom build system and i need to pack some .so files in android apk (aars with native libs are not yet supported).
I've invoked ./gradlew assembleDebug --debug for the apk project that depends on aar with native…

4ntoine
- 19,816
- 21
- 96
- 220
1
vote
0 answers
How to call Strace native library in Android application?
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…

Humming Bird
- 121
- 1
- 9
1
vote
0 answers
How cdo I builda tzutalin dlib library in Eclipse?
I can use "tzutalin dlib" library for face detection used in Eclipse, but I don't know how to build a native library. Can any one help me?
I have used all classes which are required but I always get an error popup,and always so error in for…

user3541157
- 11
- 1
1
vote
1 answer
How do I link Gradle to a native Android library and solve 'could not find method externalNativeBuild()'?
I meet a problem when trying to build Telegram Source Code in Android Studio (https://github.com/DrKLO/Telegram).
I have installed NDK, CMake, LLDB.
But I got this error:
"Gradle sync failed: Could not find method externalNativeBuild()"
Here is my…

D. Tan
- 11
- 2
1
vote
1 answer
How to allow specific ABIs for specific native libraries?
I need to filter my 3-rd party native libraries and allow only "armeabi" for all of them. With one exception! - a specific library must be included in its "armeabi-v7a" variant.
How can I filter my 3rd party native libraries differently depending…

Stan
- 2,151
- 1
- 25
- 33
1
vote
1 answer
getting java.lang.UnsatisfiedLinkError when trying to load a native library (.so file)
I am developing a Video Player in Android.
Because I need to use code with LGPL license, I have to put the native library in some place.
To load the jniLibs, I'm trying to use System.load().
With jniLibs folder within the project structure…

Joao barreira
- 91
- 1
- 6
1
vote
0 answers
including *.so lib in android app using Eclipse?
I want to use *.so file in my android app so I copied file to "libs\armeabi\libctrl_gpio.so" as suggested at some websites. When I run and create apk file, Eclipse creates this folder(inside apk)!
"lib\armeabi\libctrl_gpio.so"
It changes "libs" to…

hamid
- 852
- 11
- 27