簡體   English   中英

Linux中的離子android構建問題

[英]Ionic android build issue in linux

我已經成功安裝了cordova v6.3.1, ionic v2.0.0Android Studio

操作系統: Virtualbox(Xubuntu)

當我運行離子生成android

我得到以下錯誤:

BUILD FAILED

Total time: 7.749 secs

Error: /var/lib/mymachine/ionic-01/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 dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:2.1.0.
     Required by:
         :android:unspecified
      > Could not resolve com.android.tools.build:gradle:2.1.0.
         > Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
            > org.apache.http.ssl.SSLInitializationException: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts (No such file or directory)
      > Could not resolve com.android.tools.build:gradle:2.1.0.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
            > org.apache.http.ssl.SSLInitializationException: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts (No such file or directory)

很少有帖子建議安裝Android支持存儲庫和Google Repository。 我安裝了它。 但我仍面臨着面部問題。

在此輸入圖像描述

我有類似的問題。 在我的情況下,它是使用gradle的簡單java webapp。 這個項目使用java 6.我的java 6安裝不正確。 這就是為什么我有以下問題。

在此輸入圖像描述

gradle無法找到/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts

這是另一個不存在的文件的符號鏈接。

所以我刪除了我的jdk並重新安裝它。 這解決了這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM