FORUMS

Need help in configuring Cordova in Windows 10

16 posts
Thanks Meter: 1
 
By introuble361, Junior Member on 3rd May 2020, 09:13 PM
Post Reply Email Thread
Posting here because not privileged to post in developer section.
I have installed npm 6.14.4, installed gradle 6.3, installed javac 1.8.0_251, installed android sdk, Installed Android studio, installed corvoda 9.0.0
All system variables set.
Running windows 10 pro 1909
Cordova requirements output:
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: installed C:\gradle-6.3\bin\gradle
Some of requirements check failed

Can't build android application it gives error?

Cordova build android output:
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Program Files\AndroidTbox\sdk (recommended setting)
ANDROID_HOME=C:\Users\7ammudy\AppData\Local\Androi d\Sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:6.3.
Searched in the following locations:
- https://dl.google.com/dl/android/mav...gradle-6.3.pom
- https://dl.google.com/dl/android/mav...gradle-6.3.jar
- https://jcenter.bintray.com/com/andr...gradle-6.3.pom
- https://jcenter.bintray.com/com/andr...gradle-6.3.jar
Required by:
project :

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

* Get more help at https://help.gradle.org

BUILD FAILED in 9s
C:\cmder\myapp\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:6.3.
Searched in the following locations:
- https://dl.google.com/dl/android/mav...gradle-6.3.pom
- https://dl.google.com/dl/android/mav...gradle-6.3.jar
- https://jcenter.bintray.com/com/andr...gradle-6.3.pom
- https://jcenter.bintray.com/com/andr...gradle-6.3.jar
Required by:
project :

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

* Get more help at https://help.gradle.org

BUILD FAILED in 9s

C:\cmder\myapp ([email protected])
5th May 2020, 10:36 AM |#2  
karandpr's Avatar
Senior Moderator / Developer Committee Lead / Recognized Developer- Lord of Memes
Thanks Meter: 12,451
 
More
You will have to install Android Studio. And download Android SDK Tools and Build Tools.(latest version & target versions)
5th May 2020, 09:14 PM |#3  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by karandpr

You will have to install Android Studio. And download Android SDK Tools and Build Tools.(latest version & target versions)

I have installed android studio too still same problem.
Where can I find build tools? isn't android sdk or platform tools are build tools? I have them installed too and set path in system variable.
6th May 2020, 05:46 AM |#4  
karandpr's Avatar
Senior Moderator / Developer Committee Lead / Recognized Developer- Lord of Memes
Thanks Meter: 12,451
 
More
Quote:
Originally Posted by introuble361

I have installed android studio too still same problem.
Where can I find build tools? isn't android sdk or platform tools are build tools? I have them installed too and set path in system variable.

Go Android Studio.
Open Tools Menu.
Select SDK Manager.
Make sure you have Platfrom 28 (Pie) installed .
Move to SDK Tools menu in SDK Manager.
Make sure you have build tools, platform tools & sdk tools installed.

I have pasted my config below. I use it to develop Cordova ,Capacitor, React Native , Core Android, & Flutter Apps.
Just FYI,over the years the automatic cordova builds(cordova run android/cordova build android) dont work as advertised. So sometimes you will have to make builds using android studio by importing the platforms/android folder in Android Studio.


6th May 2020, 11:12 PM |#5  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by karandpr

Go Android Studio.
Open Tools Menu.
Select SDK Manager.
Make sure you have Platfrom 28 (Pie) installed .
Move to SDK Tools menu in SDK Manager.
Make sure you have build tools, platform tools & sdk tools installed.

I have pasted my config below. I use it to develop Cordova ,Capacitor, React Native , Core Android, & Flutter Apps.
Just FYI,over the years the automatic cordova builds(cordova run android/cordova build android) dont work as advertised. So sometimes you will have to make builds using android studio by importing the platforms/android folder in Android Studio.


Ok somethings were missing I installed them from android studio's sdk manager... 1 option is missing from my sdk manager it does not have "SDK Tools" it has platform-tools installed that.
Below is the snippet after installing the missing tools.



Below is the output of "cordova requirements"
7th May 2020, 05:22 AM |#6  
karandpr's Avatar
Senior Moderator / Developer Committee Lead / Recognized Developer- Lord of Memes
Thanks Meter: 12,451
 
More
Quote:
Originally Posted by introuble361

Ok somethings were missing I installed them from android studio's sdk manager... 1 option is missing from my sdk manager it does not have "SDK Tools" it has platform-tools installed that.
Below is the snippet after installing the missing tools.




Below is the output of "cordova requirements"

You have installed platforms but they are not detected.
I think you should change the Environmental variables as follows
Code:
ANDROID_SDK_ROOT=C:\Users\7ammudy\AppData\Local\Android\Sdk 
ANDROID_HOME=C:\Users\7ammudy\AppData\Local\Android\Sdk
7th May 2020, 01:38 PM |#7  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by karandpr

You have installed platforms but they are not detected.
I think you should change the Environmental variables as follows

Code:
ANDROID_SDK_ROOT=C:\Users\7ammudy\AppData\Local\Android\Sdk 
ANDROID_HOME=C:\Users\7ammudy\AppData\Local\Android\Sdk

system variables already had the above path set. User variable had ANDROID_SDK_ROOT path set to \Users\7ammudy\AppData\Local\Android\Sdk but ANDROID_HOME to different path. I changed the ADNROID_HOME path to \Users\7ammudy\AppData\Local\Android\Sdk still same error
7th May 2020, 01:55 PM |#8  
karandpr's Avatar
Senior Moderator / Developer Committee Lead / Recognized Developer- Lord of Memes
Thanks Meter: 12,451
 
More
Quote:
Originally Posted by introuble361

system variables already had the above path set. User variable had ANDROID_SDK_ROOT path set to \Users\7ammudy\AppData\Local\Android\Sdk but ANDROID_HOME to different path. I changed the ADNROID_HOME path to \Users\7ammudy\AppData\Local\Android\Sdk still same error


Can you check if platforms are installed as below ?
7th May 2020, 05:19 PM |#9  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by karandpr


Can you check if platforms are installed as below ?

Yes all installed.
7th May 2020, 05:29 PM |#10  
karandpr's Avatar
Senior Moderator / Developer Committee Lead / Recognized Developer- Lord of Memes
Thanks Meter: 12,451
 
More
Quote:
Originally Posted by introuble361

Yes all installed.

Which cordova-android version are you targetting ?
Remove android platform and reinstall using

Code:
cordova platform add [email protected]
7th May 2020, 05:37 PM |#11  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by karandpr

Which cordova-android version are you targetting ?
Remove android platform and reinstall using

Code:
cordova platform add [email protected]

same resuts. I ran cordova platform remove android after that I ran cordova platform add [email protected] then ran cordova requirements same error android SDK not installed.
I created new project using the below commands
Code:
cordova create test00 com.androidtest.test00
after running the above command I cd in the new project and ran below command.
Code:
cordova platform add [email protected]

Code:
cordova requirements
output>>
Post Reply Subscribe to Thread

Tags
cordova phonegap help

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes