gpt4 book ai didi

android - ionic cordova构建Android失败

转载 作者:行者123 更新时间:2023-12-03 04:26:33 28 4
gpt4 key购买 nike

我需要使用Ionic Cordova构建一个Android应用程序,但是有一个我无法解决的问题,希望获得一些建议。

我的 ionic 信息如下:

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-plugin-proxy : 1.4.6
@ionic/cli-utils : 1.10.0-alpha.b34c24dc
ionic (Ionic CLI) : 3.10.0-alpha.b34c24dc

全局套餐:
Cordova CLI : 7.0.1 

本地套餐:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.0

系统:
Node : v6.9.1
npm : 4.1.2
OS : macOS Sierra

使用 sudo ionic cordova build android并显示错误:
cordova-android-play-services-gradle-release  PLAY_SERVICES_VERSION:  
11.+
ANDROID_HOME=/Users/neolee/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
Subproject Path: CordovaLib
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000
reached waiting for exclusive access to file:
/var/root/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip
at
org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Error: /Users/neolee/IonicSpace/ionic-welcome/platforms/android/gradlew:
Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000
reached waiting for exclusive access to file:
/var/root/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip
at
org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

我给 /var/root/.gradlesudo chmod -R 777 ...,但不起作用。

谁能告诉我原因,我该如何解决?

最佳答案

我遇到了同样的问题(在Windows上),我通过直接向文件夹授予访问权限解决了这个问题。

关于android - ionic cordova构建Android失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46139768/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com