为什么gradle trys在过去下载它们时再次下载依赖项?
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.androied.support:appcompat-v7:23.0.1'
//compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:cardview-v7:23.0.1'
compile project(':sweetsheet')
compile files('libs/bolts-tasks-1.3.0.jar')
}
错误:
Error:(30, 13) Failed to resolve: com.androied.support:appcompat-v7:23.0.1
<a href="openFile:F:/projects/AndroidStudio/Samadie/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
我一直不在线。我下载了appcompat-v7:
screenshot of downloaded appcompat-v7
答案 0 :(得分:1)
你有一个错字。
com.androi e d.support:appcompat-v7:23.0.1
而不是
com.android.support:appcompat-v7:23.0.1
答案 1 :(得分:0)
您可以在android studio中更改gradle设置
转到设置并键入gradle然后您可以勾选gradle offline work并且gradle不会每次都下载依赖项。