执行gradle clean命令报错

gradle clean

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 0s

分析一下错误信息,发现是sdk的目录不对

解决方案:

①定位到项目的-->local.properties文件并打开

②将错误的路径 sdk.dir=D\:\\Android\\sdk  更改自己的sdk所在目录    即可!

打开local.properties

nano local.properties

查看当前环境,android sdk 所在的位置(-即android home环境变量的值):/usr/local/android-home

修改:

再次执行:

gradle clean

看到 BUILD SUCCESSFUL的字样就表示成功了

参考了:

https://blog.csdn.net/sucuijiao/article/details/79740141

最新文章

  1. 琴弦文字 - wpf行为
  2. 用js实现放大镜的效果
  3. SQL pivot 基本用法 行列转换 数据透视
  4. SpringMVC学习总结(七)——SpringMVC注解@..详解
  5. Pie(二分)
  6. <memory> is not a BOMStorage file
  7. 浅谈Web Api配合SignalR的跨域支持
  8. POj 1879 Tempus et mobilius Time and motion (模拟+群)
  9. Number String
  10. [TensorFlow] Basic Usage
  11. 【js】性能问题
  12. windows phone 8.1开发SQlite数据库操作详解
  13. vue 父组件向子组件传递事件/调用事件
  14. XMPP(一)-openfire服务端的安装和搭建
  15. c++中thread的死法
  16. Hibernate session中的createCriteria方法
  17. python 文件的打开与读取
  18. 树莓派SD卡制作,并成功启动
  19. 详解SQL中的GROUP BY语句
  20. Error: could not find java.dll如何解决

热门文章

  1. python-生成式的基本使用
  2. [未解决]报错: crawlab启动失败
  3. 9、numpy——数组操作
  4. 在vue中设计一个客户签名的功能
  5. Winfrom传值 分类: C# 2015-07-22 15:41 1人阅读 评论(0) 收藏
  6. python 子类继承父类__init__(转载)
  7. read - 在文件描述符上执行读操作
  8. Move Over and Click Link
  9. [BZOJ5073] [Lydsy1710月赛]小A的咒语 后缀数组+dp+贪心
  10. 使用字节流(InputStream、OutputStream)简单完成对文件的复制