简体   繁体   中英

how to use the previous version of gradle in android studio?

i know there is a duplicate question but i don't see the answer there, so asking a diff question.

i clicked on gradle upgrade pop up in android studio, and it installed 6.1.1, currently there are some issues with 6.1.1 version, so i wanted to install the old version 5.6.4. so i went to AS -> file -> project structure ->project and changed back to old version 5.6.4. then got the following error.

Gradle sync failed: Minimum supported Gradle version is 6.1.1. Current version is 5.6.4. If using the gradle wrapper, try editing the distributionUrl in /Users/sravan/projects/android-project/gradle/wrapper/gradle-wrapper.properties to gradle-6.1.1-all.zip

it was working fine before upgrade. so just want to go back to 5.6.4.

i reinstalled android studio by deleting all the projects, .gradle files and all. but still did not work.

any thoughts? where we can setup minimum version?

got it resolved:

uninstall the entire android studio

uninstalling android with the following commands

rm -Rf /Applications/Android\ Studio.app  
rm -Rf ~/Library/Preferences/AndroidStudio*  
rm -Rf ~/Library/Preferences/com.google.android.*  
rm -Rf ~/Library/Preferences/com.android.*  
rm -Rf ~/Library/Application\ Support/AndroidStudio*  
rm -Rf ~/Library/Logs/AndroidStudio*  
rm -Rf ~/Library/Caches/AndroidStudio*  
rm -Rf ~/.AndroidStudio*  
rm -Rf ~/.gradle  
rm -Rf ~/.android  
rm -Rf ~/Library/Android*  
rm -Rf /usr/local/var/lib/android-sdk/  
rm -Rf /Users/<username>/.tooling/gradle

Remove your project and clone it again and then goto Gradle Scripts and open gradle-wrapper.properties and change the below url which ever version you need

distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.6-all.zip

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM