Questions tagged [ndk-build]

Android NDK's shell script for building C and C++ source code. The tag is to be used with the [android-ndk] tag.

ndk-build is a shell script of Android NDK for building C and C++ source code. Internally, ndk-build uses tool.

The tag is to be used either with or tags.

379 questions
0
votes
1 answer

How do you define the NDK installation that ndk-build uses?

How do you define the NDK installation that ndk-build uses? I used the r10e build for a good while, then updated my NDK and modified my $PATH to point to the new location, but when I build using the ndk-build command in Terminal it still uses the…
Alyoshak
  • 2,696
  • 10
  • 43
  • 70
0
votes
0 answers

I can't compile telegram source code with NDK

I installed NDK and set the NDK path in "Project Structure" : And then I added below codes to build.gradle: task buildNative(type: Exec, description: 'Compile JNI source via NDK') { def ndkDir = android.ndkDirectory commandLine…
0
votes
0 answers

An asm error ocured when compile gmp-6.1.0 source code with ndk-build

guys.i want to compile the gmp source code for arm platform,and i have written an android.mk file for it(just some src file and c-includes).failed when compile /mpf/sub.c file with asm error,but i haven't found any asm code in the sub.c file,the…
0
votes
1 answer

Android NDK: How do I rebuild the .APK file(s)?

I'm building my NDK project on a Mac from the command line (Terminal). I am able to compile and link my "libmain" and I have been using Android Studio to install the built app on my phone.. or at least so I thought.. From what I can see, my .apk…
SparkyNZ
  • 6,266
  • 7
  • 39
  • 80
0
votes
1 answer

ndk-build of static lib - why is it building other files?

I have a project structure as follows. All I want to do is build a static library with SQLite source but for some reason when I run ndk-build, it builds other source too - as if it is including Android.mk files in other…
SparkyNZ
  • 6,266
  • 7
  • 39
  • 80
0
votes
1 answer

include .so in Android Studio with Build:Gradle:2.1.0

I know there are many similar questions but I simply don't understand it. I have managed to integrate ndk-build within build.gradle but it seems I cant include the .so in my .apk. Here is my build.gralde: apply plugin:…
0
votes
1 answer

Incorporate open source JniLibs into own android project

I have source code from a demo app that is involves some native coding. I'd like to integrate some part of that code into my own app. This is how the code is structured: app/ java/ com.demoUser/ caffe_android_demo/ …
mcExchange
  • 6,154
  • 12
  • 57
  • 103
0
votes
1 answer

gradle experimental library link order

I am trying to build an application using android gradle experimental plugin 0.7.0-alpha5. I have an application "mainProject" that depends on a native library "nativeLibrary", which itself depends on several other library (either precompiled or…
0
votes
1 answer

Android.mk PREBUILT_SHARED_LIBRARY how to generate LOCAL_SRC_FILES file from script?

I have an NDK project where I build the shared libraries using the cross-compiler and standard gnu make utils. That is done with a separate script. But for the purpose of using the libraries in my project, I would like my Android.mk process to…
Eric Lange
  • 1,755
  • 2
  • 19
  • 25
0
votes
0 answers

Two Android.mk use the same cpp files, any way to make another Android.mk don't recompile?

I have two projects: class *.cpp project1 jni obj build.sh project2 jni obj build.sh Two projects use the same cpp files, but when I build jni,they create two obj directory in project1/project2, any way to let another…
Kid
  • 77
  • 1
  • 6
0
votes
1 answer

How to find text relocations in .so file?

When I try to run my .so file on Android 6 I got this message: Loading Native Audio Library... 03-20 15:07:55.182 19446 19446 : Cannot Load Native Library !!! 03-20 15:07:55.182 19446 19446 : java.lang.UnsatisfiedLinkError: dlopen failed:…
VitalyD
  • 289
  • 1
  • 15
0
votes
0 answers

ndk-build not recognized as an internal or external command

I know that this is a duplicate question and had been asked hundreds of time. But this error occurs even after adding NDK folder path to System variable path. Please if someone have any idea about this then let me know.
Rahul Bhavani
  • 311
  • 2
  • 10
0
votes
0 answers

Android studio SQLite imports after compiling with ndk

I have to compile SQLite with ndk-build. I am using this documentation https://www.sqlite.org/android/doc/trunk/www/index.wiki I have folder JNI in app/ and org/ folder in /app/src/ app/ jni/Android.mk jni/Application.mk jni/sqlite/* …
0
votes
1 answer

Confusions in NDK samples

I am a beginner to Android NDK with Android Studio. While trying to grasp the ideas through tutorials I got my self very confused. Mainly I am confused about the building method of native project. For example while following this tutorial, when I…
CryptoKitty
  • 654
  • 4
  • 20
0
votes
0 answers

how to add Eclipse project with jni to Android studio

I want to add my libary project with jni build works with eclipse. but when I add this project to android studio. As module it compiles perfectly, but when I run it, it crashes with the error: java.lang.UnsatisfiedLinkError:…