Gio
Gio

Reputation: 13

new to Apache Cordova: build failed

I am trying to build an Adroid app with javascript... using Apache Cordova. I have followed the instructions and installed the required components but it doesn't work! I get this when I enter build:

C:\Users\qiova\cordova\hello>cordova build Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=undefined (DEPRECATED) Using Android SDK: C:\Users\qiova\AppData\Local\Android\sdk Subproject Path: CordovaLib Subproject Path: app

FAILURE: Build failed with an exception.

No installed build tools found. Please install the Android build tools version 30.0.3.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s Command failed with exit code 1: C:\Users\qiova\cordova\hello\platforms\android\gradlew cdvBuildDebug -b C:\Users\qiova\cordova\hello\platforms\android\build.gradle

I am trying to build an Adroid app with javascript... using Apache Cordova. I have followed the instructions and installed the required components but it doesn't work!

Upvotes: 0

Views: 252

Answers (1)

Mister_CK
Mister_CK

Reputation: 1073

You can download an android sdk in android studio. Just go to settings preferences and search for sdk, there you can add build tools for version 30.0.3. There you can also see what the path is for the sdk. You should add that path to your environment variables (~/.zshrc) ANDROID_SDK_ROOT=PATH/TO/SDK and add the thools to your path: PATH=ANDROID_SDK_ROOT/tools:$PATH You should also add the folder that contains you platform tools to your path. You can download those here: https://developer.android.com/studio/releases/platform-tools

If you are still getting the error, you can explicitly point to your build tools as well, by adding them to you environment variables too, with: PATH=${PATH}:path/to/build/tools (they are inside your sdk, platform tools should be there too) Let me know if you still experience errors.

Upvotes: 0

Related Questions