Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

Android build fail | NDK not configured #610

Open
subversivo58 opened this issue Nov 13, 2017 · 0 comments
Open

Android build fail | NDK not configured #610

subversivo58 opened this issue Nov 13, 2017 · 0 comments

Comments

@subversivo58
Copy link

subversivo58 commented Nov 13, 2017

I'm trying to use a cordova plugin nodejs-mobile-cordova however I'm getting an error: NDK not configured.

I opened a question in the project repository (plugin) regarding this, one of the members tried to build an application that also depended on SDK and also ended up having the same error.

One note that this member made about my error log was:

From the error message, it seems the build system is unable to find the Android Native Development Kit (NDK). The cordova plugin needs to run NDK and CMake while building, since it depends on JNI C code compiling for Android. I tried to look up if build.phonegap.com supports NDK/CMake from gradle build, but I couldn't find a mention for that.

I tried two builds, the first with the plugin (which failed) and the second without (success).

The link to the question in the nodejs-mobile-cordova plugin repository:

Error log:

Build Date: 2017-11-13 11:21:48 +0000
--------------------------------------------------------------------------------
PLUGIN OUTPUT
--------------------------------------------------------------------------------
Fetching plugin "cordova-plugin-battery-status@~1.2.4" via npm
Installing "cordova-plugin-battery-status" at "1.2.5" for android
Fetching plugin "cordova-plugin-camera@~2.4.1" via npm
Installing "cordova-plugin-camera" at "2.4.1" for android
Fetching plugin "cordova-plugin-compat@^1.1.0" via npm
Installing "cordova-plugin-compat" at "1.2.0" for android
Subproject Path: CordovaLib
Fetching plugin "cordova-plugin-media-capture@~1.4.3" via npm
Installing "cordova-plugin-media-capture" at "1.4.3" for android
Fetching plugin "cordova-plugin-file@^4.0.0" via npm
Installing "cordova-plugin-file" at "4.3.3" for android
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on android.

The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

      "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.
        
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on android.
Fetching plugin "cordova-plugin-device@~1.1.6" via npm
Installing "cordova-plugin-device" at "1.1.7" for android
Fetching plugin "cordova-plugin-dialogs@~1.3.3" via npm
Installing "cordova-plugin-dialogs" at "1.3.4" for android
Plugin "cordova-plugin-file" already installed on android. Making it top-level.
Fetching plugin "cordova-plugin-geolocation@~2.4.3" via npm
Installing "cordova-plugin-geolocation" at "2.4.3" for android
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on android.
Fetching plugin "cordova-plugin-globalization@~1.0.7" via npm
Installing "cordova-plugin-globalization" at "1.0.8" for android
Fetching plugin "cordova-plugin-inappbrowser@~1.7.1" via npm
Installing "cordova-plugin-inappbrowser" at "1.7.2" for android
Fetching plugin "cordova-plugin-network-information@~1.3.3" via npm
Installing "cordova-plugin-network-information" at "1.3.4" for android
Fetching plugin "cordova-plugin-vibration@~2.1.5" via npm
Installing "cordova-plugin-vibration" at "2.1.6" for android
Fetching plugin "nodejs-mobile-cordova@~0.1.1" via npm
Installing "nodejs-mobile-cordova" at "0.1.0" for android
Subproject Path: CordovaLib
Installing "com.phonegap.plugins.hydration" at "6.6.0" for android
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-network-information" already installed on android.
Fetching plugin "cordova-plugin-whitelist" via npm
Installing "cordova-plugin-whitelist" at "1.3.3" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
          
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on android.
Fetching plugin "phonegap-plugin-contentsync" via npm
Installing "phonegap-plugin-contentsync" at "1.4.1" for android
--------------------------------------------------------------------------------
COMPILE OUTPUT
--------------------------------------------------------------------------------
Subproject Path: CordovaLib
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'project'.
> NDK not configured. 
  Download it with SDK manager.)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.406 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'project'.
> NDK not configured. 
  Download it with SDK manager.)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Cordova build to Android (clean)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant