[英]Ionic android build issue in linux
I have successfully installed cordova v6.3.1, ionic v2.0.0
and Android Studio
我已经成功安装了
cordova v6.3.1, ionic v2.0.0
和Android Studio
OS: Virtualbox (Xubuntu) 操作系统: Virtualbox(Xubuntu)
when i run ionic build android 当我运行离子生成android
I get below error: 我得到以下错误:
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)
Few post suggested to install Android support repository and Google Repository. 很少有帖子建议安装Android支持存储库和Google Repository。 I installed it.
我安装了它。 But still i face the face problem.
但我仍面临着面部问题。
I had the similar problem. 我有类似的问题。 In my case it was simple java webapp which was using gradle.
在我的情况下,它是使用gradle的简单java webapp。 This project used java 6. My java 6 was not installed properly.
这个项目使用java 6.我的java 6安装不正确。 Thats why I had the below issue.
这就是为什么我有以下问题。
gradle was not able to find the /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts gradle无法找到/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
This is a symlink to another file which was not present. 这是另一个不存在的文件的符号链接。
So I removed my jdk and re-installed it. 所以我删除了我的jdk并重新安装它。 That solved the problem.
这解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.