Build.gradle启动失败 [英] Build.gradle startup failed
本文介绍了Build.gradle启动失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
错误:(1,0)原因:启动失败:
构建文件'C :\ Users \dns\MyApplication\app\build.gradle':1:意外的char:0x0 @第1行,第1列。
这样:
加载设置
无法从文件加载设置'C:\ Users \\\\\\\\\\\\\\\\\\'':Error line 1:Content is not allowed in prolog。
请更正文件内容
我需要知道什么?也许,我需要找到这些文件?
我没有改变任何东西。
感谢您的帮助!
这是我的gradle file:
顶级构建文件,您可以在其中添加对所有子项目/模块通用的配置选项。 buildscript {repositories {jcenter()} dependencies {classpath'com.android.tools.build:gradle:1.5.0'//注意:不要在这里放置您的应用程序依赖关系;它们属于//在单个模块build.gradle文件中}} allprojects {repositories {jcenter()}} task clean(type:Delete){delete rootProject.buildDir}
$在Android Studio文件菜单中选择Invalidate Caches / Restart
I was working with my project, but my notebook froze for a long time. So, I rebooted it and ran Android Studio, but the project doesn't work. All the activities and classes are ok, but Android Studio shows mt build.gradle error. And my build.gradle(app) file became empty! There is nothing in this file! I don't know, whats's the problem. Here's the message from Android Studio
Error:(1, 0) Cause: startup failed: build file 'C:\Users\dns\MyApplication\app\build.gradle': 1: unexpected char: 0x0 @ line 1, column 1.
And this:
Load Settings Cannot load settings from file 'C:\Users\dns\MyApplication\.idea\misc.xml': Error on line 1: Content is not allowed in prolog. Please correct the file content
What do I need to do know? Maybe, I need to find these files? I did not change anything in them.
Thank you for help!
Here's my gradle file:
Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
解决方案In Android Studio "file" menu choose "Invalidate Caches/ Restart"
这篇关于Build.gradle启动失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文