Android的工作室1.5.1不能建立 [英] Android studio 1.5.1 cannot build

查看:284
本文介绍了Android的工作室1.5.1不能建立的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我遇到了很多采用Android工作室的问题。

我使用的Andr​​oid 1.5.1工作室,以插件的gradle 1.5.0(对应于摇篮2.2.1,我认为),在Windows 7上。

Lately, I encounter a lot of problems using Android Studio.
I'm using Android Studio 1.5.1, with gradle plugin 1.5.0 (corresponding to Gradle 2.2.1, I think), on Windows 7.

有没有现在更新为Android制作室,既没有独立的SDK管理器。

There is no update for Android Studio for now, and neither in standalone SDK manager.

有时,当我尝试推出模拟器上我的应用程序,该程序builing不会停止(我等了1小时一次...)。即使我退出模拟器和公正基础上的Gradle同步项目,它推出了永无止境的过程。日志文件不写,没有错误消息的任何地方。

Sometimes when I try to launch my app on an emulator, the builing process wont stop (I waited for 1 hour once...). Even after I quit the emulator and just build project on sync gradle, it launch a process that never ends. The log file is not writing and there is no error message anywhere.

有关该进程结束,我得去的任务管理器,并阻止每一个java.exe的过程中,我看到了,那么就说明这条消息:

For the process to end, I have to go to the taskmanager and stop every java.exe process I see, and it then shows this message :

错误:无法启动守护进程。这个问题可能会导致
  由守护进程的配置不正确。例如,无法识别
  JVM选项使用。请参考在用户手册章节
  在守护 https://docs.gradle.org/2.8/userguide/gradle_daemon.html
  请阅读下面的过程输出,以了解更多:
  
-----------------------

Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.8/userguide/gradle_daemon.html Please read the following process output to find out more:
-----------------------

在这之后,没有任何构建会成功,为我的项目successfuly建设的唯一方法是重新启动我的操作系统! (即使taskkilling所有已知的相关任务,如android64.exe,adb.exe,将java.exe后)

After that, not any build will succeed, and the only way for my project to successfuly build is to reboot my OS ! (even after taskkilling every known related task, like android64.exe, adb.exe, java.exe)

时的bug知道的?有什么解决方法吗?难道我做错了什么?

Is the bug known ? Is there any workaround ? Am I doing something wrong ?

当它错误时,gradle这个控制台写

When it bugs, the gradle console is writing

Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources]`. 

,但后来什么都没有。它更多的是gradle这个工作不是比它的抚摸上的一个点。但仍有其内存66MB ...

, but then nothing. It's more that gradle is not working than it's stroking on one point. But there still is that java.exe process with its 66Mb of memory...

这虫子后约8成功运行。

It bugs after approximately 8 successful runs.

我现在知道真正的麻烦制造者!这是C:\\用户\\我\\ .gradle \\守护程序\\ 2.8 \\ registry.bin

I know now the real troublemaker ! It is C:\Users\Me\.gradle\daemon\2.8\registry.bin

我可以在它上面甚至没有点击右键没有崩溃Windows资源管理器!

I can't even right click on it without crashing Windows Explorer !

推荐答案

我一直面临着同样的问题。不过,我有它已经成功构建了previous项目。我所做的是 - 改变了我新的应用程序的服务目录路径(一个指向.gradle文件夹)的位置,从结果的成功构建应用程序的服务目录路径,即
C:/用户/ 您的用户名 / AndroidStudioProjects / 当前应用 / gradle这个结果


C:/用户/ 您的用户名 / AndroidStudioProjects / 成功地构建应用 / gradle这个

I have been facing the same problem. However, I had a previous project which had been successfully built. What I did was - changed the location of Service Directory Path(the one pointing to the '.gradle' folder) of my new app to the Service Directory Path of the successfully built app, i.e from
C:/Users/YOUR USERNAME/AndroidStudioProjects/CURRENT APP/.gradle
to
C:/Users/YOUR USERNAME/AndroidStudioProjects/SUCCESSFULLY BUILT APP/.gradle

要更改服务目录path-结果
进入设置 - >构建,执行,部署 - >构建工具 - >摇篮 - >服务目录路径

To change the service directory path-
go to settings --> Build, Execution, Deployment --> Build Tools --> Gradle --> service directory path

这篇关于Android的工作室1.5.1不能建立的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆