Android Studio - Gradle构建运行永无止境

时间:2015-10-13 05:11:09

标签: java android android-studio gradle debian

我刚在我的电脑上安装了Debian 8。我尝试设置Android-Studio(1.4):

当我尝试创建一个新项目时,如果我打开一个旧项目,它就会陷入困境(我让它运行超过1小时,它永远不会结束)。 在控制台中,它始终打印:

  

$ android-studio / bin / studio.sh工具API正在使用目标Gradle   版本:2.4。为此版本启动新的Gradle守护程序(后续   构建会更快)。启动进程'命令   “/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java”。工作目录:   / home / tobias / AndroidStudioProjects / MyApplication命令:   /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -version成功   启动进程'命令   '/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java''启动守护进程   进程:workingDir = /home/tobias/.gradle/daemon/2.4,daemonArgs:   [/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java,-XX:MaxPermSize = 256m,   -XX:+ HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding = UTF-8,-Duser.country = US,-Duser.language = en,-Duser.variant,-cp,/ opt / android-studio / gradle / gradle -2.4 / lib目录/ gradle这个-发射-2.4.jar,   org.gradle.launcher.daemon.bootstrap.GradleDaemon,2.4,   /home/tobias/.gradle,/home/tobias/.gradle/daemon,10800000,   4f46addb-22d0-418f-8179-49ef885a95cc,-XX:MaxPermSize = 256m,   -XX:+ HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding = UTF-8,-Duser.country = US,-Duser.language = en,-Duser.variant]启动进程'Gradle build daemon'。工作目录:   /home/tobias/.gradle/daemon/2.4命令:   /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -XX:MaxPermSize = 256m   -XX:+ HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding = UTF-8 -Duser.country = US -Duser.language = en -Duser.variant -cp /opt/android-studio/gradle/gradle-2.4/lib/gradle-发射-2.4.jar   org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.4   /home/tobias/.gradle /home/tobias/.gradle/daemon 10800000   4f46addb-22d0-418f-8179-49ef885a95cc -XX:MaxPermSize = 256m   -XX:+ HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding = UTF-8 -Duser.country = US -Duser.language = en -Duser.variant已成功启动进程'Gradle build daemon'尝试启动守护进程   花了1.354秒。连接到守护进程DaemonInfo {pid = 4668,   地址= [d3bdeeea-46b5-40d0-8eaf-ab113cda06ce port:33671,   地址:[/ 0:0:0:0:0:0:0:1%1,/ 127.0.0.1]],idle = false,   上下文= DefaultDaemonContext [UID = 4f46addb-22d0-418f-8179-49ef885a95cc,JAVAHOME = / usr / lib中/ JVM / JAVA -7-的openjdk-AMD64,daemonRegistryDir = /家庭/托拜厄斯/ .gradle /守护进程,PID = 4668,的idleTimeout = 10800000,daemonOpts = -XX:MaxPermSize参数= 256M,-XX:+ HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding = UTF-8,-Duser.country = US,-Duser.language = EN,-Duser.variant]} 。   调度请求构建{id = d764db2d-9d61-4582-8c7c-ba0d7d68ca22.1,   currentDir = /家庭/托拜厄斯/ AndroidStudioProjects / MyApplication的}。

我尝试过重新安装并重新启动,没有。

1 个答案:

答案 0 :(得分:1)

问题可能是因为即使使用64位系统也需要32位库。

查看此帖子missing dependencies android SDK 讨论是围绕eclipse,但同样的问题适用于android studio。

如果您使用Fedora,这应该可以解决您的问题,并帮助您避免一些其他问题。 Fedora版本< = 21

yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686

Fedora版本> 21

dnf install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686