0

When i try to build a Cordova Android App it replies with

ERROR Message

The Environmental variables are :
ANDROID_SDK_ROOT --> C:\Users\Admin\AppData\Local\Android\sdk
JAVA_HOME --> C:\Program Files\Java\jdk1.8.0_191

PATH -->
C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools;
C:\Users\Admin\AppData\Local\Android\Sdk\tools;
C:\Gradle\gradle-5.5\bin;
C:\Users\Admin\AppData\Local\Android\sdk\tools\bin

& all cordova requirements are fulfilled
Cordova Requirements

So can you help me what is the solution here, and thanks in advance :)

AFF
  • 33
  • 1
  • 1
  • 7

2 Answers2

1

Its a network issue, the gradle will not download if you're in a proxy network

Ram
  • 356
  • 2
  • 14
  • I don't think so , I've added gradle and edited file "C:\h\platforms\android\cordova\lib\builders\projectbuilders.js" var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'file:\\\C:\Gradle\gradle-5.5-all.zip';
    Also all cordova requirements are fulfilled
    – AFF Jul 11 '19 at 11:54
  • can you check the environment variables is set correctly? – Ram Jul 11 '19 at 12:07
  • Thanks Ramachandran :) , But i set it as written in the question,i think all are right – AFF Jul 11 '19 at 12:09
  • Did you this https://stackoverflow.com/questions/32153915/ionic-build-android-error – Ram Jul 11 '19 at 12:12
1

I think it's works for above error

Please Copy templates folder From here--C:\Program Files\Android\Android Studio\plugins\android\lib\ And paste To here--C:\Users\your User\AppData\Local\Android\Sdk\tools\

Chetan
  • 198
  • 10