2017-03-06 51 views
3

當我更新android studio時,出現此錯誤。創建一個新項目沒有問題。我無法建立我現有的項目。未能打開zip文件gradle依賴關係緩存可能已損壞

Showing error

我已經工作網絡,當我點擊重新下載該錯誤不固定。 我該如何解決這個問題?我嘗試了很多在互聯網上找到的方法,但沒有運氣。

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:25.0.1' 
compile 'cz.msebera.android:httpclient:4.4.1.1' 
compile 'com.mcxiaoke.volley:library:1.0.18' 
compile 'com.squareup.okhttp3:okhttp:3.4.1' 
compile 'com.github.florent37:materialtextfield:1.0.5' 
compile 'com.googlecode.json-simple:json-simple:1.1' 
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' 
compile 'com.rengwuxian.materialedittext:library:2.1.4' 
compile 'de.hdodenhof:circleimageview:2.1.0' 
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1' 
compile 'com.github.sundeepk:compact-calendar-view:1.9.8' 
compile 'com.github.bumptech.glide:glide:3.7.0' 
} 

回答

4

gradle從項目目錄中刪除wrapper文件夾。

2

的gradle使用-3.3例如

第一:刪除gradle.zip~/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip

第二步:從項目目錄中刪除中的wrapper文件夾。

最後:重新同步項目中的gradle文件。

相關問題