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.

352 questions
61
votes
4 answers

Difference between CMake and NDK-build in android studio project

What is the actual difference between CMake and NDK build in android studio project. I already went through google documentation but the concept is not clear yet. As per google documentation: The Android Native Development Kit (NDK): a toolset that…
0xAliHn
  • 16,415
  • 20
  • 78
  • 97
57
votes
2 answers

How to use 32-bit native libraries on 64-bit Android device

I use a native library in my application that is only compiled for armeabi, armeabi-v7a and x86. When this library is loaded on a 64-bit device like the Samsung S6, the application crashes with an UnsatisfiedLinkError java.lang.UnsatisfiedLinkError:…
Philipp E.
  • 3,129
  • 3
  • 31
  • 52
19
votes
1 answer

Could not find method cppFlags() arguments() for arguments

I am trying to use std::function But the compiler throws an error Error:(50, 10) error: no type named 'function' in namespace 'std' I have tried to modify the build.gradle file externalNativeBuild { ndkBuild { path…
user4671628
18
votes
5 answers

Change ndk-build output locations

My app has the following structure Android | |-> app | | | |-> build [1] | |-> src | | |-> main | | | |-> assets | | | |-> java | | | |-> jni | | | | |-> Android.mk | | | | …
madlymad
  • 5,902
  • 6
  • 32
  • 60
13
votes
3 answers

Could not find method externalNativeBuild() for arguments

i'm trying to integrate the ndkBuild functionality into an existing android studio project, using the new android studio 2.2 , in order to enable c++ debugging etc. i have tried out one of the ndk example projects which android studio 2.2 offers,…
11
votes
2 answers

How to specify path of libraries in Android.mk file or Application.mk file?

I need to specify the path of library in Application.mk file to link it correctly. How to do this? Is there any GCC command for that?
rajeswari
  • 187
  • 2
  • 3
  • 9
10
votes
4 answers

Android Studio 3.3 Stuck at Project Setup:reading from cache

I have create module library with NDK. After updating Android Studio 3.3, open project on studio stuck on build project Project Setup:reading from cache... Every time needs to "Invalidate and Restart" android studio then after studio working. I…
Jigar Shekh
  • 2,730
  • 5
  • 26
  • 50
9
votes
4 answers

Android Studio ERROR: Executing external native build for ndkBuild when trying to run Gstreamer tutorial

I am trying to run the gstreamer android tutorial-5 in Android Sudio 3.5 (https://gitlab.freedesktop.org/gstreamer/gst-docs/tree/master/examples/tutorials/android)(https://gitlab.com/eduardoprado/gstreamer-tutorial5) but get the following…
unmanned15
  • 167
  • 1
  • 1
  • 14
9
votes
2 answers

Android Studio native code compiling is slow

I recently switched from Eclipse+ADT to Android Studio. My app is a full native C++ application. I use Android Studio 2.0 Beta 5 and Gradle Experimental 0.6.0-beta4. The build process of Android Studio is very slow for the native code. I read all…
9
votes
3 answers

Android NDK build, Method could not be resolved

I have an Android project with native code. I'm able to build native code from command line by calling ndk-build command with no errors or warnings. But when I open it in ADT it shows the following error. Error message: Method CallStaticIntMethod…
sergej shafarenka
  • 19,464
  • 6
  • 62
  • 82
8
votes
1 answer

How to use ndk-stack step-by-step?

I'm trying to debug this error: 01-12 13:38:18.068 275-275/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 01-12 13:38:18.068 275-275/? I/DEBUG: Build fingerprint:…
Mohsen
  • 1,620
  • 3
  • 15
  • 22
7
votes
5 answers

NDK is missing a "platforms" directory. while trying to build

Executing tasks: [clean] Configuration on demand is an incubating feature. NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to …
ishandutta2007
  • 12,620
  • 12
  • 74
  • 99
7
votes
1 answer

Gradle using different abiFilters for debug and release

here's a piece of my build.gradle file: android { //... defaultConfig { //... externalNativeBuild { ndkBuild { targets "MyGame" arguments…
Makalele
  • 6,691
  • 4
  • 49
  • 75
7
votes
2 answers

How is TARGET_ARCH_ABI set in Android.mk

I am trying to build my native application using ndk-build. Suppose I followed this guide to create my Android project: https://rathodpratik.wordpress.com/2013/03/24/build-cc-executables-for-android-using-ndk/ When I try to print out my…
shaveenk
  • 1,745
  • 4
  • 22
  • 35
7
votes
1 answer

WARNING: .../Android.mk: non-system libraries in linker flags

I'm getting this warning while running $ANDROID_NDK_ROOT/ndk-build. The Android.mk is below. $ $ANDROID_NDK_ROOT/ndk-build WARNING:/Users/jwalton/Android-CryptoPP/jni/Android.mk:prng: non-system libraries in linker flags: -lcryptopp…
jww
  • 83,594
  • 69
  • 338
  • 732
1
2 3
23 24