Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve depedency with ndk-build in Android?

I've Googled for a solution, but no one of them has solved my problem.

I have downloaded Tess-two and tried to ndk-build with downloaded ndk15r from https://developer.android.com/ndk/downloads/index.html but nothing happens, same issue:

Error:(687) Android NDK: Module pngt depends on undefined modules: z
Error:(700) *** Android NDK: Aborting (set APP_ALLOW_MISSING_DEPS=true to >allow missing dependencies) . Stop. Error:Execution failed for task ':tess-two:ndkClean'.

Process 'command '/Users/archimedia/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2

I've tried also to ignore this error when from terminal I'm gone in tess-two directory, and I've typed "ndk-build", and I've imported the project directly. But my Android Studio console has logged same error.

How can I save my life???

like image 835
Archimedia Elettronica Avatar asked Mar 28 '17 14:03

Archimedia Elettronica


People also ask

What can I do with Android NDK?

The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.

How do I know if NDK is installed?

Click the SDK Tools tab. Select the NDK (Side by side) and CMake checkboxes. Note: If you have an NDK installed in the ndk-bundle folder, it appears in the list with the label NDK. If you are using Android Gradle plugin 3.5.

What is the difference between NDK and sdk?

Android provides Native Development Kit (NDK) to support native development in C/C++, besides the Android Software Development Kit (Android SDK) which supports Java.

What compiler does Android NDK use?

Code written in C/C++ can be compiled to ARM, or x86 native code (or their 64-bit variants) using the Android Native Development Kit (NDK). The NDK uses the Clang compiler to compile C/C++.


1 Answers

You can also add APP_ALLOW_MISSING_DEPS := true to the Application.mk file without downgrading the ndk.

See: https://github.com/android-ndk/ndk/wiki/Changelog-r14-beta1#ndk-build

like image 117
Bill - K5WL Avatar answered Oct 06 '22 08:10

Bill - K5WL