问题1

场景:

Error:A problem occurred configuring root project '项目名'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Timeout waiting to lock artifact cache (/Users/Skyf/.gradle/caches/modules-2). It is currently in use by another Gradle instance.
     Owner PID: 10747
     Our PID: 10791
     Owner Operation: 
     Our operation: 
     Lock file: /Users/Skyf/.gradle/caches/modules-2/modules-2.lock

 

解决:

删除项目中的.gradle文件夹  再次编译

 

问题2

场景:

Error:A problem occurred configuring project ':app'.(和1不一样,这边指的是主app)
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > Timeout waiting to lock artifact cache (/Users/Skyf/.gradle/caches/modules-2). It is currently in use by another Gradle instance.
     Owner PID: 10747
     Our PID: 10791
     Owner Operation: 
     Our operation: 
     Lock file: /Users/Skyf/.gradle/caches/modules-2/modules-2.lock

 

 

解决:

删除主app里的build,再重新编译一次,之后出现了 method ID not in [0, 0xffff]: 65536 的错误,老问题,闭着眼睛处理掉。

 

问题3

场景:

各种不能用: 可以查看一下详情,一般原因都写都很清楚,我这边是因为端口号没有配置好的网络问题

/Users/Skyf/Documents/Android Project/hotspot/app/build.gradle
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.mob:MobTools:+.
Open File
Show Details
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.mob:MobCommons:+.
Open File
Show Details
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.mob:MobGUI:+.
Open File
Show Details
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.mob:SDKWrapper:+.
Open File
Show Details
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve cn.sharesdk:ShareSDK:+.
Open File
Show Details

 

 

解决:

因网络原因引起的可以试试这些方法:

 

方法1:FQ 

 

方法2:Go to `File->Settings->Build, Execution, Deployment->Gradle->Uncheck Offline work option.`

 

方法3:打开gradle.properties   ——> 注释掉端口号的设置 项 systemProp.http.proxyPort=10895

 

 

更多相关文章

  1. Android第九讲——网络(六)xUtils
  2. Android(安卓)的AsyncTask使用
  3. 关于android的webview打开淘宝天猫链接问题
  4. Android:获取屏幕分辨率方法汇总
  5. android 开发之坑系列_实体序列化问题
  6. android获取短信方法1
  7. 浅谈Java中Collections.sort对List排序的两种方法
  8. mybatisplus的坑 insert标签insert into select无参数问题的解决
  9. Python list sort方法的具体使用

随机推荐

  1. android studio 修改生成的apk 包名
  2. Android收藏商品/关注商品
  3. android 进程内存分析
  4. android 窗口如何靠左和靠右边框布局
  5. Android解析Xml字符串例子
  6. android 搭建http服务器AndroidAsync
  7. vs2015 支持Android arm neon Introducin
  8. 7个Android应用程序源代码
  9. android图片转换代码
  10. Android监听屏幕锁屏