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
70
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
  • 18,390
  • 23
  • 91
  • 111
61
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,296
  • 3
  • 34
  • 52
21
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
  • 6,367
  • 6
  • 37
  • 68
20
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
15
votes
7 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
  • 16,676
  • 16
  • 93
  • 129
14
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
  • 2,121
  • 3
  • 18
  • 25
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,…
12
votes
6 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
  • 227
  • 1
  • 3
  • 19
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,800
  • 6
  • 29
  • 54
10
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
  • 7,431
  • 5
  • 54
  • 81
10
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
4 answers

Limit CPU cores for ndkBuild with Cmake and Ninja

Before, when I was using ndkBuld for building native code on Android I was able to pass an argument to make to define a number of CPU cores to be used. If I wanted to utilize 4 cores I could add something like this externalNativeBuild { ndkBuild…
bio007
  • 893
  • 11
  • 20
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
  • 20,071
  • 7
  • 67
  • 86
8
votes
3 answers

UVCCamera with samples, how import to android studio?

I want work with usb camera (uvc) and Android Studio (Windows). I am having problems with the USB cam library "libuvccamera". I want to know how solve the problems or any another way to get the view of the usb cam in my app. Let me explain better…
Ana
  • 93
  • 7
1
2 3
25 26