我在打开 Android Studio 时遇到此错误。
我以前从未遇到过这个错误。我已经尝试清理和重新同步 gradle,我已经更新了 SDK Manager 中的所有包,
我已经重启了我的 Android Studio,
我以管理员身份运行它,
我也尝试过构建一个新项目,但这个错误不会消失。
请帮我解决这个问题。
Error:Failed to create parent directory 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4' when creating directory 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401'
[更新]
在我尝试重建我的项目后,我遇到了这样的新错误。
Error:A problem occurred configuring root project 'BPSGoSurvey'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve commons-logging:commons-logging:1.1.1.
Required by:
:BPSGoSurvey:unspecified > com.android.tools.build:gradle:1.3.0 > com.android.tools.build:gradle-core:1.3.0 > com.android.tools.build:builder:1.3.0 > com.android.tools:sdklib:24.3.0 > org.apache.httpcomponents:httpclient:4.1.1
:BPSGoSurvey:unspecified > com.android.tools.build:gradle:1.3.0 > com.android.tools.build:gradle-core:1.3.0 > com.android.tools.build:builder:1.3.0 > com.android.tools:sdklib:24.3.0 > org.apache.httpcomponents:httpmime:4.1
> Could not resolve commons-logging:commons-logging:1.1.1.
> Could not parse POM file:/E:/Android%20Studio/gradle/m2repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
> Could not resolve org.apache.commons:commons-parent:5.
> Could not resolve org.apache.commons:commons-parent:5.
> Could not parse POM file:/E:/Android%20Studio/gradle/m2repository/org/apache/commons/commons-parent/5/commons-parent-5.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download8245895784892794258bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
> Could not resolve org.apache.commons:commons-parent:5.
> Could not parse POM https://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download3502880229047415896bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
> Could not resolve commons-logging:commons-logging:1.1.1.
> Could not parse POM https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
> Could not resolve org.apache.commons:commons-parent:5.
> Could not resolve org.apache.commons:commons-parent:5.
> Could not parse POM file:/E:/Android%20Studio/gradle/m2repository/org/apache/commons/commons-parent/5/commons-parent-5.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download6416635460030578050bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
> Could not resolve org.apache.commons:commons-parent:5.
> Could not parse POM https://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download916061549622655000bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
> Could not resolve commons-codec:commons-codec:1.4.
Required by:
:BPSGoSurvey:unspecified > com.android.tools.build:gradle:1.3.0 > com.android.tools.build:gradle-core:1.3.0 > com.android.tools.build:builder:1.3.0 > com.android.tools:sdklib:24.3.0 > org.apache.httpcomponents:httpclient:4.1.1
> Could not resolve commons-codec:commons-codec:1.4.
> Could not parse POM file:/E:/Android%20Studio/gradle/m2repository/commons-codec/commons-codec/1.4/commons-codec-1.4.pom
> Could not resolve org.apache.commons:commons-parent:11.
> Could not resolve org.apache.commons:commons-parent:11.
> Could not parse POM file:/E:/Android%20Studio/gradle/m2repository/org/apache/commons/commons-parent/11/commons-parent-11.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download8269455495978527180bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
> Could not resolve org.apache.commons:commons-parent:11.
> Could not parse POM https://jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download3692548803835443828bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
> Could not resolve commons-codec:commons-codec:1.4.
> Could not parse POM https://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.pom
> Could not resolve org.apache.commons:commons-parent:11.
> Could not resolve org.apache.commons:commons-parent:11.
> Could not parse POM file:/E:/Android%20Studio/gradle/m2repository/org/apache/commons/commons-parent/11/commons-parent-11.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download5076305514553905674bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
> Could not resolve org.apache.commons:commons-parent:11.
> Could not parse POM https://jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
> Could not resolve org.apache:apache:4.
> Could not resolve org.apache:apache:4.
> Could not get resource 'https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom'.
> Failed to move file 'C:\Users\User\AppData\Local\Temp\gradle_download1507005468069947828bin' into filestore at 'C:\Users\User\.gradle\caches\modules-2\files-2.1\org.apache\apache\4\602b647986c1d24301bc3d70e5923696bc7f1401\apache-4.pom'
最佳答案
由于它是一个 gradle 缓存目录,请尝试强行删除它(或其父目录)。某些其他进程可能已锁定该目录,不允许 Studio 访问它。删除后,关闭与Android Studio关联的所有进程(adb、studio.exe、java.exe等)。然后尝试重新启动 Studio。
关于android - 无法在 Android Studio 上解析配置 ':classpath' 的所有依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38670371/
我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
我试图获取一个长度在1到10之间的字符串,并输出将字符串分解为大小为1、2或3的连续子字符串的所有可能方式。例如:输入:123456将整数分割成单个字符,然后继续查找组合。该代码将返回以下所有数组。[1,2,3,4,5,6][12,3,4,5,6][1,23,4,5,6][1,2,34,5,6][1,2,3,45,6][1,2,3,4,56][12,34,5,6][12,3,45,6][12,3,4,56][1,23,45,6][1,2,34,56][1,23,4,56][12,34,56][123,4,5,6][1,234,5,6][1,2,345,6][1,2,3,456][123
我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在
我在我的项目中添加了一个系统来重置用户密码并通过电子邮件将密码发送给他,以防他忘记密码。昨天它运行良好(当我实现它时)。当我今天尝试启动服务器时,出现以下错误。=>BootingWEBrick=>Rails3.2.1applicationstartingindevelopmentonhttp://0.0.0.0:3000=>Callwith-dtodetach=>Ctrl-CtoshutdownserverExiting/Users/vinayshenoy/.rvm/gems/ruby-1.9.3-p0/gems/actionmailer-3.2.1/lib/action_mailer
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
在MRIRuby中我可以这样做:deftransferinternal_server=self.init_serverpid=forkdointernal_server.runend#Maketheserverprocessrunindependently.Process.detach(pid)internal_client=self.init_client#Dootherstuffwithconnectingtointernal_server...internal_client.post('somedata')ensure#KillserverProcess.kill('KILL',
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我已经从我的命令行中获得了一切,所以我可以运行rubymyfile并且它可以正常工作。但是当我尝试从sublime中运行它时,我得到了undefinedmethod`require_relative'formain:Object有人知道我的sublime设置中缺少什么吗?我正在使用OSX并安装了rvm。 最佳答案 或者,您可以只使用“require”,它应该可以正常工作。我认为“require_relative”仅适用于ruby1.9+ 关于ruby-主要:Objectwhenrun