First, a two-week solution was found online:
Plan 1: Since Gradle is suggested, start with this batch. What is Gradle?Please poke here: click open link
1. The File – & gt; Invalidate caches/Restart
2. The Shutdown Android Studio
3. Rename/remove. Gradle Folder in the user Home Directory
4 Restart Android Studio let it Download all the Gradlestuff it Needs
Gradle Build Success!
6. Rebuild project… success !
File -> Settings Search for Gradle, make the following changes (specify the location of Gradle to be downloaded manually), For Gradle download, please stamp here: click open link
The above method didn’t work, so I killed gradle and Gradle in the project directory, created a new project, copied the two folders in the new project, and the Studio returned to normal.
In addition to the above methods, based on personal experience can also be:
This can also happen if a project developed on an original device is about to be moved to another device (the gradle update download is very slow)
At this point, first go to the Settings of Android Studio under the new device and turn off the Proxy
Then go to the directory of Gradle
Use the.gradle directory for the original device instead of the gradle directory for the new device.
- Solve gradle project refresh failed
- Could not install Gradle distribution
- Errorjava.lang.NullPointerException(no error message)
- Failed to find target with hash string ‘android-25’ in:D:\SDK
- android studio Error Gradle project sync failed. Please fix your project and try again
- Error:Unknown host ‘maven.aliyun.com‘. You may need to adjust the proxy settings in Gradle.
- Re installing Android studio always fails to install SDK when installing software (solution)
- Android Error | Failed to find target with hash string ”android-23′ in…
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- ERROR: Unsupported method: AndroidProject.getVariantNames().
- Add a warehouse in allprojects repositories and report an error
- AS3.5 Error gradle project sync failed.Basic functionality(e.g.editing,debugging) will not work
- [error record] invalid gradle JDK configuration found
- Solve the error when installing apk after compiling Android Studio: Error while Installing APK
- [Solved] Android gradle Error: gradle project sync failed. Please fix your project and try again
- Some processing experiences of failed to notify build listener
- com.android.ddmlib.AdbCommandRejectedException: device offline Error while Installing APK (How to Fix)
- Error in Cordova project execution command after Android studio upgrade: could not find gradle wrapper within Android SDK
- How to Fix Android Error:This Gradle plugin requires Studio 3.0 minimum
- Gradle sync failed: Sync failed: reason unknown