ionic build android error

后端 未结 3 1732
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-11 11:44

I\'m confused. jdk,sdk,ant,cordova,ionic doing well,why builds error?
I searched everywhere,but no answer for it.
I guess has a error version?
who can help this?

相关标签:
3条回答
  • 2020-12-11 12:24

    First of all you have to install

    1. node.js
    2. apache ANT
    3. JDK & JRE
    4. Android SDK & Eclipse

    After installation, you have to set software paths into environmental- variable. Then fire your npm install -g cordova. Without this PhoneGap will not be created.

    If still you have any confusion or question related to software installation then tell me.

    0 讨论(0)
  • 2020-12-11 12:25

    I had the same issue on Mac. The steps below solved that for me:

    NOTE: gradle path & version would be different on your machine. please replace those informations with yours. you can get them from exception message

    • Download : http://services.gradle.org/distributions/gradle-2.13-all.zip

    • Get List of files in directory

    sudo ls rm /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q

    • Remove existing zip file

    sudo rm /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q/gradle-2.13-all.zip

    • If there is a *.zip.lck file, you'd better remove that too..

    sudo rm /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q/gradle-2.13-all.zip.lck

    • Copy downloaded file to that path

    sudo cp /Downloads/gradle-2.13-all.zip /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q/

    Then try to run

    ionic run android

    0 讨论(0)
  • 2020-12-11 12:43

    I hope that not too late, but I had the same error and. So, I fixed it doing the next:

    In your case find this:

    C:\Users\cxt\.gradle\wrapper\dists\gradle-2.2.1- all\2m8005s69iu8v0oiejfej094b

    now you are here to delete the gradle-2.2.1-all.zip because this file is corrupted and then replace the file with this http://services.gradle.org/distributions/gradle-2.2.1-all.zip when you finish all try again

    ionic build android

    Good Luck!

    0 讨论(0)
提交回复
热议问题