问题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 ':[email protected]/compileClasspath': Could not resolve com.mob:MobTools:+.
Open File
Show Details
Error:Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.mob:MobCommons:+.
Open File
Show Details
Error:Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.mob:MobGUI:+.
Open File
Show Details
Error:Unable to resolve dependency for ':[email protected]g/compileClasspath': Could not resolve com.mob:SDKWrapper:+.
Open File
Show Details
Error:Unable to resolve dependency for ':[email protected]/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:获取屏幕分辨率方法汇总
  2. android获取屏幕长宽的方法
  3. android 进程自杀再重启的方法
  4. Android监听HOME键的最简单的方法
  5. android EditText 不自动弹出键盘的方法
  6. Android Studio ADB响应失败解决方法

随机推荐

  1. Android(安卓)Studio连接真机没反应
  2. Android中由于设置的背景图片太大导致OOM
  3. android攻略
  4. [置顶] Android上实现仿IOS弹性ScrollVie
  5. android上传文件至服务器(android端+服务
  6. 创建 Cordova/Phonegap for Android 项目
  7. 总结EditText,TextView使用的点点滴滴
  8. android 如何绕过签名校验
  9. Android 字体和颜色
  10. html5 video自动播放-Android、IOS video