When installing Cordova I get the following error anyone know of an easy fix to this? npm version 5.6, cordova version 8
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
No android targets (SDKs) installed!
Gradle: not installed
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Related
I was installing android studio 3.5.1 after installing the latest one while trying to run my CORDOVA android application I got below Error:
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=D:\Software\sdk (DEPRECATED)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Kindly help out this problem I am new to Cordova app development
What is the output of the gradle -v command? To properly install Gradle you need to create/edit the CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL environment variable with the location of a Gradle distributable ZIP.
Check out this guide to install Gradle for more details.
I am new to cordova and following instructions in "Create your first App"
I am getting Android target: not installed
PS D:\xxx\xxxxx\hello> cordova requirements
Android Studio project detected
Requirements check results for android:
Java JDK: installed 11.0.2
Android SDK: installed true
Android target: not installed
cmd: Command failed with exit code 1
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.10.1\bin\gradle
Requirements check results for ios:
Apple macOS: not installed
Cordova tooling for iOS requires Apple macOS
Some of requirements check failed
So far, I have installed (and started) Android Studio, which downloaded and installed SDKs and Tools.
Used SDK Manager to install further SDK upto API level 24
Set up environment variables etc.
How can I install Android Target?
I am using Window 10.
I'm a newcomer to the Cordova world, so I'm attempting to build and run my first app. To do so, I'm following the steps set out in the official Cordova page but I'm getting an error at the build stage.
Apparently, the android platform is added successfully:
D:\Users\user\workspace\cordova\helloworld>cordova platform add android
Using cordova-fetch for cordova-android#~6.3.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.example.helloworld
Name: HelloWorld
Activity: MainActivity
Android target: android-26
Subproject Path: CordovaLib
Android project created with cordova-android#6.3.0
Installing "cordova-plugin-whitelist" 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.
--save flag or autosave detected
Saving android#~6.3.0 into config.xml file ...
But when I check if the pre-requisites for the build stage are met, I get the following error:
D:\Users\user\workspace\cordova\helloworld>cordova requirements
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
cmd: Command failed with exit code 1 Error output: "avdmanager" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable.
Gradle: installed C:\Program Files\Gradle\gradle-4.3.1\bin\gradle
Error: Some of requirements check failed
I don't just understand how is it possible no Android target is installed as long as the cordova platform add android command worked successfully. What am i doing wrong?
I've got the following tools installed (Windows 7 x64):
JDK 1.8.0
Android SDK 25.2.5
Gradle 4.3.1
Node 8.9.1
Cordova 7.1.0
I think the environment variables are set ok:
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
GRADLE_PATH=C:\Program Files\Gradle\gradle-4.3.1
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_152
Path= ... ; C:\Program Files\nodejs\;
D:\Users\user\AppData\Roaming\npm;
C:\Program Files\Java\jdk1.8.0_152\bin;
C:\Program Files (x86)\Android\android-sdk\platform-tools;
C:\Program Files (x86)\Android\android-sdk\tools;
C:\Program Files\Gradle\gradle-4.3.1\bin
I'd like to say that I didn't install Android Studio as I prefer to use eclipse+ADT plugin. To install the Android SDK tool I got from the Internet an installer .exe (version 24.4.1) which got updated automatically on first run. Current version of Android SDK, and as I said, is 25.2.5. From the Android SDK Manager I installed API levels 21 - 26, which I can see within the ANDROID_HOME\platforms (android-21, android-22, ..., android-26 folders).
Any explanation about what is happening would be appreciated.
Thanks.
Try changing the target api version in manifest file, project. properties in platform folder (android)and project.properties in Cordovalib folder
I upgraded from cordova-android 6.3.0 to 6.4.0 and also updated Android Studio from 2.3 to 3.0.0 (http://cordova.apache.org/announcements/2017/11/09/android-release.html)
At cordova build time, I'm no facing the error:
ANDROID_HOME=/Users/me/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Any ideas?
Thx solution was found by #Sujan12 on the Ionic Framework forum.
Furthermore to the updates of the Android libs, I had to install locally Gradle (https://gradle.org/install/).
(be sure to modify the PATH variable permanently after Gradle install)
Once this done, I was able to build my app again
https://forum.ionicframework.com/t/solved-update-cordova-android-6-3-0-6-4-0-gradle-not-found/112123/4
I just updated Android SDK and the Ionic dependencies in my app.
After the running command:
cordova build android
cordova run android
I get this error message:
Plugin doesn't support this project's cordova-android version. cordova-android: 3.7.1, failed version requirement: >=4.0.0-dev
I tried to change target SDK value in AndroidManifest and config back into SDK v. 19, but without luck.