2

When I am trying to do ionic build android or install codova plugins on ionic 2 project, it is getting stuck on the part Preparing "Install Android SDK Platform 24".

Such as this:

>ionic plugin add cordova-plugin-camera

Installing "cordova-plugin-camera" for android

Installing "cordova-plugin-compat" for android


ANDROID_HOME=C:\Users\kiboy\AppData\Local\Android\sdk1

JAVA_HOME=D:\JAVA\jdk1.8.0_25

Subproject Path: CordovaLib

Starting a new Gradle Daemon for this build (subsequent builds will be faster).


Preparing "Install Android SDK Platform 24".

This gets stuck for many hours.

Please help me.

Sagar Kulkarni
  • 2,072
  • 2
  • 16
  • 25
  • did you have setup Android SDK/Gradle for the CLI path? looks like you may not have Android SDK 24 – HardikDG Feb 11 '17 at 11:11
  • 1
    In fact, it s after I Downloaded Android SDK 24 that I run it. But I don't know if that is related to it. Maybe do I have to change something to set it or I don't know? Before I used SDK 22, and I ve just download SDK 24 this morning I don't know if there is other options to do. – Antsa Rakotomananjo Feb 11 '17 at 12:22
  • May be Re-adding the platform solve the issue, As you may have created project with SDK 22 and now you have SDK 24, the camera plugin is trying to install with new SDK 24, Did you download SDK 24 with the SDK manager right? – HardikDG Feb 11 '17 at 12:42
  • 1
    that s possible... I ll re add it then. I downloaded with Android studio. – Antsa Rakotomananjo Feb 11 '17 at 17:23
  • 1
    Well, I am re-adding the platform and I got that error: 'Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon.' – Antsa Rakotomananjo Feb 11 '17 at 17:31
  • I tried to remove '.gradle' do that it downloads new version, but I got 'Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file' And i m getting stucked there :( – Antsa Rakotomananjo Feb 11 '17 at 17:33
  • I tried that: http://stackoverflow.com/questions/32535930/cordova-build-gradle-error-while-opening-extracting-zip-file but still doesn t work! – Antsa Rakotomananjo Feb 11 '17 at 17:35
  • So now do you have gradle install or not? if yes you may try this: http://stackoverflow.com/q/25009717/4557505 else you can try with ant instead of gradle, it's old build system but it may work – HardikDG Feb 11 '17 at 18:36
  • Nice, gradle works fine! But it still shows the android sdk 24 error whereas I ve already downloaded it. – Antsa Rakotomananjo Feb 11 '17 at 19:00
  • Finally it works! I downgrade my cordova and installed all SDK 24 build-tools and now it works! Thank you very much @Sagar ! :) – Antsa Rakotomananjo Feb 11 '17 at 19:23

0 Answers0