Just getting started with Apache Cordova: build unsuccessful

I've been attempting to develop an Android app using JavaScript with Apache Cordova. Despite following all the steps and installing the necessary components, I'm encountering an issue during the build process:

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.

  • Where: Script 'C:\Users\qiova\cordova\hello\platforms\android\CordovaLib\cordova.gradle' line: 69

  • What went wrong: A problem occurred evaluating the script.

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

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option for more log output. Run with --scan for full insights.

  • Get additional help at

Deprecated Gradle features were used in this build, resulting in incompatibility with Gradle 8.0.

You can use '--warning-mode all' to display individual deprecation warnings and identify whether they originate from your scripts or plugins.

See

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

My goal is to create an Android app using JavaScript through Apache Cordova. However, despite complying with the installation instructions and component requirements, the build process isn't functioning accordingly!

Answer №1

To install an Android SDK on Android Studio, navigate to the settings preferences and search for "SDK." From there, you can add build tools for version 30.0.3 and find the path for the SDK. Make sure to include this path in your environment variables (~/.zshrc). ANDROID_SDK_ROOT=PATH/TO/SDK Next, add the tools to your path:

PATH=ANDROID_SDK_ROOT/tools:$PATH
Don't forget to also add the directory containing your platform tools to your path. You can download them from here.

If you continue encountering errors, you may need to explicitly specify the location of your build tools by adding them to your environment variables using: PATH=${PATH}:path/to/build/tools (these should be within your SDK, along with the platform tools) Feel free to reach out if you need further assistance resolving any issues.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Implement a code to apply to an image that is loaded dynamically

I have a situation on a page where an image is loaded via ajax within a wrapping div. I need to execute some code as soon as that image is loaded. Unfortunately, I am unable to modify the ajax call, which means using on('success') directly on the ...

Interacting with a Facebook tracking pixel as I navigate away from my website

I'm interested in implementing Facebook's pixel tracking to monitor user exits from my website, rather than entrances. I specifically want the tracking code to be triggered upon exit. The standard code provided by Facebook is as follows: <sc ...

Is it possible to pass props in React-Native without relying on the navigator component

Is there a way to pass properties to a webview without using navigator? I am working on updating the source for a WebView in my index.ios.js file while keeping the song playing throughout the app. In my index.ios.js, I have an invisible iframe that allows ...

Combining Two Arrays Based on Unique Identifier

Seeking guidance on enhancing this method to eliminate the need for a workaround. I have two separate Object Arrays containing JSON data. The first array consists of all dates within a specific range, while the second array is derived from a SQL query, po ...

Is there a way for me to display my ActionBar Items as icons instead of having them hidden in the overflow menu?

Currently, I am using the latest version of Lollipop with minimum and targeted SDK set to 22. minSdkVersion 22 targetSdkVersion 22 In my gradle build file, I have updated these values to 22 multiple times, as well as rebuilt, invalidated caches, and clea ...

What is the simplest method in R or Python to incorporate an image or video into a popup/infowindow when clicking on a map plot marker

I possess a collection of (latitude, longitude) data points from around the world that are linked to unique place names, each corresponding to specific image or video data. My goal is to develop an HTML file where users can click on each point to view the ...

Error: The componentwillmount function has encountered an issue. Actions must be in the form of plain objects. For asynchronous actions, consider

Currently, I am setting up a feature to retrieve all images based on their type using redux-saga. There are two types available: kristik and motif. While implementing the kristik type, everything works smoothly and I receive successful responses. However, ...

eliminate several digits past the decimal place

I thought this would be a simple task, but I'm completely stuck with the code I currently have! https://i.sstatic.net/Y36Cg.png render: (num) => { return <span><b>{num.toFixed(2)}</b>%</span>; // rounding to two de ...

Save message in the callback function of the express app.listen method

I'm currently integrating winston logging into my application and aiming to switch all info or error level logs with winston's .info and .error. Everything seems to be working well except when trying to log an info message from within the app.lis ...

What causes the size discrepancy of a single point appearing differently on various devices?

I decided to use pt for font sizes on different devices in order to maintain consistency, but I'm facing issues with varying resolutions resulting in inconsistent display font sizes. public class MainActivity extends AppCompatActivity { @Overrid ...

Connecting AngularJS with select options

I am currently developing a checkout feature that calculates shipping prices based on the selected country. If the user picks United States, it should display US. For any other country selection, it should show Not US While the shipping function correctly ...

Appium's RemoteWebDriver experiencing issues with sendkeys functionality

I am currently working with Appium 1.4.16 to automate an apk file that is stored on my local system and running on a real Android device. In this project, I am utilizing java-client 3.4.1. Below you can find the code snippet: public static void main(Strin ...

Is it possible to invoke a method beyond a directive's scope?

I am new to using directives in Angular and I have encountered an issue that I need help with. I have a file called common.js which contains the following method: function showAlert(value) { alert(value); } Within my directive: app.directive('cc ...

How to create a see-through background using three.js

I am new to working with three.js and recently came across a codepen that caught my attention. However, I am facing difficulties while trying to change the background color. After exploring various questions related to this issue, I attempted to add { alp ...

React hook form submit not being triggered

import React, { useState } from "react"; import FileBase64 from "react-file-base64"; import { useDispatch } from "react-redux"; import { makeStyles } from "@material-ui/core/styles"; import { TextField, Select, Input ...

Tips on changing the button ID within a class based on a condition in JavaScript?

Currently, I am utilizing ChartJS to create a pie chart where elements are added each time the user clicks on a specific button. There are 14 buttons in total that trigger the addition of a specific element to the pie chart. Each button activates a functio ...

I'm having trouble getting Handlebars helpers to function properly with arguments on MeteorJS

I'm attempting to utilize a basic handlebars helper, with arguments, in the framework of MeteorJS. Allow me to provide an example: {{#myList data className="myClassName"}} {{name}} {{/myList}} The helper function is defined as follows: Handlebar ...

Using AngularJS to Nest ng-view within ng-repeat

I have a collection of items. Each item has buttons to display its details and comments within this ng-view section. It is necessary for the user to view all available product details on one page, for example. Below is the HTML list: <div ng-controll ...

Utilize AngularJS to bind a variable and display an external HTML file without the need to open it in a browser

In my setup, I have two HTML Views - one is for application purposes and the other is for printing. Let's call them Application.html and PrintForm.html, respectively. Here is a snippet from Application.html: <!DOCTYPE html> <html> < ...

Efficient Ways to Present and Personalize Indian Date and Time using JavaScript

Hey there, currently creating my website and need some assistance. I'm looking to display the date and time in different sections of the page. Having some trouble with getting Indian time to work properly using PHP. If you could help me out with Ja ...