简体   繁体   English

Build.gradle启动失败

[英]Build.gradle startup failed

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. 因此,我重新启动它并运行了Android Studio,但是该项目无法正常工作。 All the activities and classes are ok, but Android Studio shows mt build.gradle error. 所有活动和类都可以,但是Android Studio显示mt build.gradle错误。 And my build.gradle(app) file became empty! 我的build.gradle(app)文件变成空的! There is nothing in this file! 此文件中没有任何内容! I don't know, whats's the problem. 我不知道这是什么问题。 Here's the message from Android Studio 这是来自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: 这是我的gradle文件:

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 }

在Android Studio的“文件”菜单中,选择“无效的缓存/重新启动”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM