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
381
questions
71
votes
4
answers
28k
views
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 ...
61
votes
2
answers
44k
views
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 ...
22
votes
1
answer
8k
views
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
...
21
votes
5
answers
16k
views
Change ndk-build output locations
My app has the following structure
Android
|
|-> app
| |
| |-> build [1]
| |-> src
| | |-> main
| | | |-> assets
| | | |-> java
| | | |-&...
16
votes
7
answers
32k
views
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. ...
14
votes
1
answer
6k
views
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: 'samsung/...
13
votes
3
answers
23k
views
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 ...
12
votes
6
answers
23k
views
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/...
11
votes
2
answers
14k
views
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?
10
votes
1
answer
4k
views
Gradle using different abiFilters for debug and release
here's a piece of my build.gradle file:
android {
//...
defaultConfig {
//...
externalNativeBuild {
ndkBuild {
targets "MyGame"
...
10
votes
4
answers
7k
views
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 ...
10
votes
2
answers
3k
views
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 ...
9
votes
4
answers
11k
views
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 ...
9
votes
3
answers
6k
views
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 ...
8
votes
2
answers
13k
views
Gstreamer examples in Android Studio
I have been trying to get Gstreamer working in Android studio, following their tutorials, see for example here:
https://gstreamer.freedesktop.org/documentation/tutorials/android/link-against-...
8
votes
2
answers
5k
views
What is the difference between "jobject" & "jclass" in C++ NDK
I did 2 different implementations from tutorials I followed and I noticed the parameters are a little different for each one, 1 parameter is jclass and the other is jobject I don't use these ...
8
votes
2
answers
18k
views
NDK: Is it possible to define the android NDK Version in build.gradle so the native code will use a defined version?
Here's my problem:
I've got a library stored at Github. That Library contains native code and everything that's needed for handling C++ files. Locally the project/library works fine but I want to ...
8
votes
2
answers
5k
views
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-...
8
votes
3
answers
3k
views
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 ...
7
votes
1
answer
21k
views
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-...
7
votes
2
answers
2k
views
Compile standalone binaries with NDK 13
With NDK 10 releases, I used to use ndk-build to compile standalone binaries for many different ABIs and multiple API levels. These binaries were to be included in an app. However, I installed the NDK ...
7
votes
2
answers
5k
views
Android NDK Support Version Limited
I have used Android NDK for years, however, recently, I saw the message below when I built CPPs using ndk-build(ndk version 15)
Android NDK: android-9 is unsupported. Using minimum supported ...
6
votes
1
answer
3k
views
NDK build with different mk file for release/debug
We have a setup where our Android game contains a few native libraries that get built using ndk-build.
Our project contains the following structure:
Root
|
|-- jni
|
|-- Android.mk //...
6
votes
2
answers
3k
views
External Native Build Issue with Phimp.me project
I am trying to import an Android project. When building the project following errors are shown:
Error: Caused by: org.gradle.api.GradleException: executing external native build for ndkBuild
/mnt/...
6
votes
2
answers
7k
views
Crashlytics NDK: No symbols for crashes since update to new sdk
It worked fine until we updated to the new SDK, and now it only shows the last java stack frame on the report. The task uploadCrashlyticsSymbolFileFlavorDebug gets called right after ...
6
votes
1
answer
3k
views
Android NDK - building native libraries without Android Studio
I'm working on a c/c++ cross-platform project, constructed of 2 main libraries (with a few external dependencies: ssl, yajl, fribidi).
The android solution will include Java files and a JNI layer, all ...
5
votes
2
answers
3k
views
Unable to find android NDK builder r9 for mac
I have a need to build my code using Android NDK builder r9.
But I don't have windows with me only mac.
I was able to find it for windows
http://dl.google.com/android/ndk/android-ndk-r9-windows-...
5
votes
1
answer
3k
views
Unable to run React-Native UIExplorer example project
I've been trying to run UIExplorer project on Windows. I am getting the following error-
...
...
make: *** [D:\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/
armeabi-v7a/objs/...
5
votes
2
answers
6k
views
Android debugging ndk-gdb
I have been fighting with this for days and I have gotten closer but still no luck. I am trying to build an android app via ndk-build NDK_DEBUG=1 which works just fine. I can launch from eclipse and ...
5
votes
1
answer
5k
views
Unable to build GStreamer tutorials using Android Studio
I am trying to build the tutorials that are bundled with gstreamer-sdk-android-arm-debug-2013.6. The Android.mk file in the src/jni directory (tutorial 1 project) references environment variables such ...
5
votes
1
answer
251
views
How do I get rid of "deprecated" warnings in legacy Cocos2Dx project
I have a legacy Cocos2D game project.
When compiling Android version, I get a lot of warnings:
warning: 'cocos2d::CCString' is deprecated (declared at ...) [-Wdeprecated-declarations]
I do not plan ...
5
votes
3
answers
7k
views
Why $(call my-dir) in Android.mk file returned wrong path?
When I try to compile .so to a bibiliotek, I receive an error that the way is incorrect and instead of the local way expected by me I see a way to NDK, in what a problem, here my MK-file:
include $(...
5
votes
1
answer
505
views
Linking library build with ndk r10 into project build with ndk r13 using c++_shared stl
We have a prebuild library that was build with android ndk r10e. The Project we are working on is being build with ndk r13b. When trying to link the library our build fails with undefined reference ...
5
votes
2
answers
866
views
C++ Firebase linking error in android project
I'm trying to add firebase c++ sdk to my cocos2d-x 3.14 game. So far I've create Android.mk in firebase_cpp_sdk directory:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := firebase-...
5
votes
0
answers
5k
views
How to get rid of "process_begin: CreateProcess(NULL, "", ...) failed." error message in Android Studio 2.2
I added working ndk-build Makefiles to a Android Studio 2.2 project to be able to debug C++ code within Android Studio. While I am able to build and debug the code, I get weird error messages in the ...
5
votes
0
answers
486
views
UnsatisfiedLink error :Native method not found findLibrary returned null
I am working on android project related to android JNI and NDK . I have loade all the .so files required for the project.But it is still showing error that UnsatisfiedLink Error,
Native method not ...
5
votes
0
answers
1k
views
Android NDK app crashed on run on functions that not even called
I am trying to build an Android app based on Miracl crypto lib (C/C++). I have added their sources and my sources to jni folder. And wrote simple call to function that loads shared_library and returns ...
4
votes
1
answer
10k
views
Android Unable to identify the apk for variant arm-debug and device
I have the .so files and the jar, but when I run it I get the error: Unable to identify the apk for variant arm-debug and device. I'm a noob here so I must be doing something wrong, but I cant seem to ...
4
votes
2
answers
6k
views
How to make "ndk-build clean" continue on error
I have a large source tree with multiple projects. One of the projects uses JNI.
When I try to "make clean" on my entire source tree it goes through and removes all the object files and libs. Then ...
4
votes
1
answer
1k
views
How to compile libogg and libvorbis for Android
In my Android app, I would like to implement the libogg and libvorbis libraries, so I can play and manipulate ogg files.
Unfortunately, I haven't managed to find any tutorial that can explain how to ...
4
votes
2
answers
7k
views
NDK- Build error
I am buliding a NDK for fbReader. But I am unable to build NDK.
whn I am using cmd ndk-build the it says no command found.
But I fill full path of NDK hen ite show the below error..
Android NDK: ...
4
votes
1
answer
6k
views
Can't include NDK header files
i wrote a simple C++ Programm using NDK, and it works fine.
Now I want to add the following header file for using logging functions:
android\log.h
My Android.mk look like this:
LOCAL_PATH := $(...
4
votes
1
answer
5k
views
difference between ndk-bundle and android-ndk-r15c
are there any difference between ndk-bundle obtained donloading the ndk from SDK manager and android-ndk-r15c from android developers?
I'm not able to compile a project cloned from git-hub, in the ...
4
votes
0
answers
658
views
Android Studio ndk-build finish with non-zero value 2
I updated my Android Studio to 3.1.3 yesterday and then the old projects previously working with NDK fail to work after that and give me this response:
Process 'command '/Users/new-User/Library/...
4
votes
1
answer
3k
views
Error during building with android-ndk : There are no modules to build in this project
I cloned git from the link below and modified some lines and tried to build it.
($git clone https://android.googlesource.com/platform/external/wpa_supplicant_8)
But it gives me the error below and I ...
3
votes
2
answers
12k
views
Error occurred executing external native build for ndkBuild in android studio
I used coolMic repofor broadcasting audio from android device.
But When i import it in android studio i got following error:-
E:\New folder (2)\CoolMicApp-Android\app\build.gradle
Error:executing ...
3
votes
1
answer
1k
views
APP_ABI ignored
I used android-ndk-r13b, I downloaded it from Android website directly (not from SDK manager) and set the path from Project Structure in the Android Studio.
It able to detect my Android.mk and ...
3
votes
2
answers
11k
views
NDK r10 b 32 bit or 64 bit or compile using both and how to achieve it
When I ndk compile a project using r10b 64 bit builder it compiles good without any problem
I am able to run the project in Lollipop succesfully and app runs as it supposed to be
But when I run the ...
3
votes
2
answers
5k
views
How can I resolve Android NDK build command faild?
I am developing a simple NDK sample example using the Android NDK in Android Studio. While running my app studio, it shows below errors.
Build command failed.
Error while executing process D:\Sdk\...
3
votes
1
answer
14k
views
Android NDK linker Error:error: undefined reference to std::basic_string
I am currently trying to build a static library of some source c++ files requiring boost. I have been following the hello-libs example and have successfully linked the boost static file dependencies ...