I have this gradle issue when i upgrade my android studio, anyone able to help me?
Asked
Active
Viewed 605 times
0
-
1What is the issue? Can you tell the error message? – Priya Rajan May 03 '17 at 10:36
-
1what happened when you clicked on the provided solution? – Tim May 03 '17 at 10:36
-
I can't click on the provided solution, whenever i click on it, it just refreshes and the same old problem came back again. @TimCastelijns – user7322413 May 03 '17 at 10:36
-
@PriyaRajan I recently upgraded my android studio, i tried to load my previous project, but i got this error. – user7322413 May 03 '17 at 10:37
-
Can you post your dependencies? Is there any red line in your dependency? – Priya Rajan May 03 '17 at 10:38
-
Have you try this? http://stackoverflow.com/questions/35101206/android-studio-re-download-dependencies-and-sync-project – Priya Rajan May 03 '17 at 10:40
-
Did you deleted your sdk folder as well? – R.R.M May 03 '17 at 11:04
2 Answers
0
Your buildToolVersion should be same as your dependency version
Eg: Open the build.gradle(Module:app)
if your buildToolsVersion '25.0.2', then
compileSdkVersion 25
targetSdkVersion 25
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.2'
compile 'com.android.support:design:25.0.2'
compile 'com.android.support:cardview-v7:25.0.2'
}
Finally, check your internet connection also.

Priya Rajan
- 687
- 8
- 21
-
Hope this link may help you http://stackoverflow.com/questions/38442901/gradles-dependency-cache-may-be-corrupt-this-sometimes-occurs-after-a-network – Sandeep dhiman May 03 '17 at 11:06
-
Always remember Gradle and Android studio updates are done seperately – praveen dewangan May 03 '17 at 11:48