Make a note of the way to fill the hole, Sweat sweat sweat

Studio comes with a clear cache

Click on the AndroidStudio menu File -> Invalidate Caches/Restart… In the dialog box that appears, click Invalidate and Restart to wait for the AS to clear and Restart automatically.

In most cases, problems can be solved. But, I was the accident...Copy the code

Delete. Gradle and. Idea from the project directory

Close AndroidStudio, go to the project root directory, and delete the. Gradle and. Idea folders. Reopening AndroidStudio will Sync automatically and wait for the synchronization to complete.

Many friends are solving problems in this stepCopy the code

Delete the user directory. Gradle

Close AndroidStudio and delete C:\Users\ username.gradle. Reopening AndroidStudio will Sync automatically and wait for the synchronization to complete.

If you delete all classpath, gradle, compile, implementation files from this folder, you need to synchronize them from the network again

4. Delete the. Android folder under the user directory

Close AndroidStudio and delete C:\Users\ username.android. Reopening AndroidStudio will Sync automatically and wait for the synchronization to complete.

Reload the SDK file

Modify the SDK folder name and download the required SDK again

Six, reload, restart method

Restart your computer and reinstall Studio


Final plan

The new installation of Studio must be no problem, then completely uninstall, reinstall!!

It’s a long story. We haven’t solved it yet

Reference from www.jianshu.com/p/af8b6a825… Compare with your own computer path, modify part of the uninstall directory, finally as follows

  • Uninstall Android Studio
rm -Rf /Applications/Android Studio.app
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application Support/Google/AndroidStudio*
rm -Rf ~/Library/Logs/Google/AndroidStudio*
rm -Rf ~/Library/Caches/Google/AndroidStudio*
Copy the code
  • Remove the Projects
rm -Rf ~/AndroidStudioProjects
Copy the code
  • Delete the gradle
rm -Rf ~/.gradle
Copy the code
  • Uninstall Android Virtual Devices(AVDs) and *.keystore
rm -Rf ~/.android
Copy the code
  • Delete the Android SDK Tools
rm -Rf ~/Library/Android
Copy the code

Install studio, relief!!