升级android studio3.0遇到的问题

问题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

 

 

你可能感兴趣的:(Android)