如果不小心手动修改了.gradle文件夹中的内容,那么再打开之前编译成功的工程时,会出现类似下面的错误:

Gradle app neame project refresh failed:

Unexpected lock protocol found in lock file. Expected 3, found 0.

Gradle settings

看到这个瞬间头大了,不知道到底啥情况!在AS中选择File菜单下的Invalidate caches and restart项目,仍然出错!

网上说都是删除.gradle文件夹,Windows系统下是在C盘中,C:\Users\[登录用户名]\.gradle这里,但是这个文件下内容很多,Gradle会自动地莫名其妙下载很多文件,包括一些未完成的文件,还有就是编译构建配置时使用的不同版本的文件,如果全部删除则很冤枉,之后很可能也会再次使用到这里的文件进行编译,摸索了一下,发现只需要删除其中的caches文件夹即可!

Android Studio编译错误:Unexpected lock protocol found in lock file. Expected 3, found 0.的更多相关文章

  1. Android Studio 编译错误 Error:Execution failed for task ':app:buildInfoDebugLoader'.

    今天来到打开昨天的项目运行正常,然后改动了一点代码编译报错: Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exc ...

  2. assets中放入中文文件名导致Android Studio编译错误

    一个android项目突然出现编译错误,如下: :app:processDebugResources FAILED FAILURE: Build failed with an exception. * ...

  3. Android Studio 编译错误

    同样的代码,在eclipse里面能编译通过,导入到Android Studio里面就报错. illegal character: \65279 终于找到答案: http://bbs.csdn.net/ ...

  4. Android Studio 编译报错:Process 'command 'D:\SDK\AS\sdk\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1

    AGPBI: {"kind":"error","text":"No resource identifier found for a ...

  5. 手把手图文并茂教你用Android Studio编译FFmpeg库并移植

    转载请把头部出处链接和尾部二维码一起转载,本文出自逆流的鱼yuiop:http://blog.csdn.net/hejjunlin/article/details/52661331 之前曾写过一篇&l ...

  6. 【Android】Android studio 编译问题:finished with non-zero exit value 2

    1.Android studio 编译问题:finished with non-zero exit value 2 问题: Error:Execution failed for task ':andr ...

  7. 我的Android进阶之旅------>解决Android Studio编译后安装apk报错:The APK file does not exist on disk

    1.错误描述 今天用Android Studio编译应用后安装APK的时候,报错了,错误如下所示: The APK file build\outputs\apk\OYP_2.3.4_I2Base_64 ...

  8. Android Studio那些错误的问题们

    本片博客会记录关于Android开发工具Android Studio出错的那些问题,包括导入项目编译失败.时间过长,莫名其妙的歇菜等等... 问题 3facets cannot be loaded.Y ...

  9. android studio 编译加速

    1. http://www.52codes.net/article/658.html 2.http://my.oschina.net/sammy1990/blog/388846 3.http://st ...

随机推荐

  1. iOS网络框架 AFNetworking

    -(void)GetActivationUser{ NSString *url = @"http://app.xxxx.com/music/search?key=%E9%AC%BC%E5%9 ...

  2. Python 列表 append() 方法

    描述 Python 列表 append() 方法用于在列表末尾追加新的对象. 语法 append() 方法语法: L.append(obj) 参数 obj -- 追加到列表末尾的对象. 返回值 该方法 ...

  3. VirtualBOX 不能mount优盘,移动硬盘解决方案

    The Solution (basically nayasis' solution with the second driver installation added): Safely unplug ...

  4. jmeter 非GUI执行测试,导入jtl文件没有响应数据出来办法

    jemter 官方也一直强调要在非GUI下执行 Run your JMeter test in command-line non-GUI mode as 在linux下执行jmeter压力测试,生成j ...

  5. Webpack中的sourcemap

    Webpack中sourcemap的配置 sourcemap是为了解决开发代码与实际运行代码不一致时帮助我们debug到原始开发代码的技术.尤其是如今前端开发中大部分的代码都经过编译,打包等工程化转换 ...

  6. nfs missing codepage or helper program, or other error

    [root@xxxxx ~]# /bin/mount -t nfs -o nosuid,noexec,nodev,noatime,intr,rsize=,wsize= xxx.xxx.xxx.xxx: ...

  7. 每日英语:Mercedes Sheds Its 'Old' Design

    Daimler AG's flagship Mercedes-Benz often gets the rap for being an 'old man's car.' More unusual is ...

  8. 每日英语:Hold On: Reasons For Never Giving Up Your Dream

    Do you remember what you wanted to be when you grew up? Maybe a fireman? A baker? A ballerina? You p ...

  9. RSS Feeds with Spring Boot

    http://nixmash.com/post/rss-feeds-with-spring-boot **************************************** We added ...

  10. 【C#/WPF】获取项目的根目录(Root Directory)

    /// <summary> /// 获得项目的根路径 /// </summary> /// <returns></returns> public str ...