天使漫步IT工作室

Error:Failed to resolve: com.android.support:appcompat-v7:24.0.0 - 解决办法


log详情

Error:Unable to resolve dependency for ':xcore@debug/compileClasspath': Could not resolve com.android.support:support-v4:26.1.0.
<a href="openFile:/Users/landsnail/Documents/gemdale/gdhlwandroid/decorate/xcore/build.gradle">Open File</a><br><a href="Unable to resolve dependency for &#39;:xcore@debug/compileClasspath&#39;: Could not resolve com.android.support:support-v4:26.1.0.">Show Details</a>

Error:Unable to resolve dependency for ':xcore@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.
<a href="openFile:/Users/landsnail/Documents/gemdale/gdhlwandroid/decorate/xcore/build.gradle">Open File</a><br><a href="Unable to resolve dependency for &#39;:xcore@debug/compileClasspath&#39;: Could not resolve com.android.support:appcompat-v7:26.1.0.">Show Details</a>
Error:Unable to resolve dependency for ':xcore@debugAndroidTest/compileClasspath': Could not resolve com.android.support:support-v4:26.1.0.
<a href="openFile:/Users/landsnail/Documents/gemdale/gdhlwandroid/decorate/xcore/build.gradle">Open File</a><br><a href="Unable to resolve dependency for &#39;:xcore@debugAndroidTest/compileClasspath&#39;: Could not resolve com.android.support:support-v4:26.1.0.">Show Details</a>

解决办法

在android stadio 中打开下面顺序然后去掉offline选项:

File->Settings->Build,Execution,Deployment->Gradle-> Disable Offline work

当前页面是本站的「Baidu MIP」版。查看和发表评论请点击:完整版 »