cordova build android failed with exception - android

I'm trying to build an Android app with cordova (without Andorid studio) from macOS.
Tried to run cordova build android
and get this error -
`cordova.gradle' line: 69
What went wrong:
A problem occurred evaluating script.
No installed build tools found. Please install the Android build tools version 30.0.3.`

Related

./gradlew failed in React Native 0.68 (Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.)

After updating to React Native 0.68, I got this error when executing ./gradlew :
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/username/path/projectname/android/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
On MacOS, you just need to install the Java Development Kit recommended by React Native
brew tap homebrew/cask-versions
brew install --cask zulu11
I guess you need to do choco install -y nodejs-lts openjdk11 on Windows by I haven't tested it.
Source: https://reactnative.dev/docs/environment-setup#installing-dependencies

Cannot Build Anroid Apk using Ionic CLI

I have build tools installed and are in path variable.
Where:
Script 'D:\ProgrammingSource\IonicProjects\ShoppingCartGeneric\platforms\android\CordovaLib\cordova.gradle' line: 68
What went wrong:
A problem occurred evaluating project ':app'.
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
using the following command i came to know that the build tools were not downloaded.
sdkmanager --list
Finally, this solved the problem..
sdkmanager "build-tools;19.1.0"

Can't run cordova run android in Ionic project

I'm having an issue running cordova run android in my Ionic project. I've uninstalled and reinstalled Cordova, Ionic, Gradle, and Android Studio, yet I still get this following error.
FAILURE: Build failed with an exception.
Where:
Script 'path/platforms/android/cordova-android-play-services-gradle-release/app-cordova-android-play-services-gradle-release.gradle' line: 11
What went wrong:
A problem occurred evaluating script.
Could not read script 'path/platforms/android/app/cordova-android-play-services-gradle-release/properties.gradle' as it does not exist.
Question: How can I get this error to go away and my project to run successfully?

IONIC 2 : While deploying an IONIC app to android device : Task 'wrapper' not found in root project 'android'

While deploying ionic app to android it's giving error as follows, It seems gradle is missing but when I check cordova requirements the gradle is installed. What's happening here?
auli#auli-H81H3-M4:~/ionic/iProjects/gplusauth$ cordova run android
ANDROID_HOME=/home/auli/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
FAILURE: Could not determine which tasks to execute.
* What went wrong:
Task 'wrapper' not found in root project 'android'.
* Try:
Run gradle tasks to get a list of available tasks.
BUILD FAILED
Total time: 1.385 secs
Error: /usr/share/gradle/bin/gradle: Command failed with exit code 1
and here is cordova requirements:
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-24,android-23,android-22,android-21,android-20,android-19,android-18,android-17,android-16,android-15,android-14
Gradle: installed /usr/share/gradle/bin/gradle
I solved this issue with upgrading gradle to latest version.
https://www.vultr.com/docs/how-to-install-gradle-on-ubuntu-16-10

while running ionic build android iam getting error You may not have the required environment or OS to build this project

I'm developing angularjs/ionic mobile application.
While running 'ionic build android' on CLI, I'm getting that error:
ERROR building one of the platforms: Error: C:\Users\Username\FirstProject\platfo
rms\android\cordova\build.bat: Command failed with exit code 2
You may not have the required environment or OS to build this project
i updated my android SDK Tools to be 24.3.3 but i'm getting the same error.

Categories

Resources