Another error was reported during Android development. This is a version error. The first step is to synchronize the versions
error message:
Android studio error: gradle project sync failed. Please fix your project and try again
1. Version synchronization:
1.1 file> sync project with android gradle
If you succeed, you don’t have to look at the following
1.2 error reporting:
It can be seen or not solved:
It should be the version problem. If we can’t download it, we can download it directly manually (check the network first, and the agent has no problem, but it still can’t be solved)
2. Modify proxy parameters:
Agent:
2.1 open file> setting> Search proxy
2.2 configuration information
The address and port of the agent shall be filled in as follows:
URL: http://127.0.0.1:1080/pac
2.3 check whether the Ping is connected
-
- use check connection
-
-
- enter a website to test: www.baidu.com, and then test: </ OL>
-
Still not!
3. Manual Download
So let’s continue:
3.1 open the gradle wrapper properties file
3.2 download
Download the gradle in the last line of the website. Note that the version must be consistent. Download whatever he puts down.
3.3 modifying environment variables
Remember to modify the gradle environment variable in the computer:
-
-
-
- system environment variable:
-
-
-
-
-
-
- path:
-
-
-
3.4 modify the compilation environment configuration
Then unzip it, modify the gradle configuration in the environment, and it’s OK.
You can see that my environment is OK now:
Read More:
- android studio Error Gradle project sync failed. Please fix your project and try again
- Error: Gradle project sync failed. Please fix your project and try again.
- Android studio “sync project with gradle files” button disappears
- AS3.5 Error gradle project sync failed.Basic functionality(e.g.editing,debugging) will not work
- Sync with Gradle for project ‘XXXX‘ failed: Connection timed out: connect
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- Solve gradle project refresh failed
- Error in Cordova project execution command after Android studio upgrade: could not find gradle wrapper within Android SDK
- [actual record of Android stepping on the pit] Android studio reports an error invalid gradle JDK configuration found after importing the project
- Gradle sync failed: Sync failed: reason unknown
- How to Fix Android Error:This Gradle plugin requires Studio 3.0 minimum
- Import Android project Error:Internal error : org.gradle.tooling .BuildException: Could not execute build…
- Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-6.7.1-b
- gradle sync failed CreateProcess error=267 directory is invalid
- Gradle tasks disappeared after upgrading Android stuido 4.2?
- Viewing Android dependency tree using gradle
- [Solved] Android Gradle configure error: Location: Class buildconfig
- gradle:failed to find Build Tools revision 29.0.2
- Solution: unity package failed. Commandinvocationfailure: gradle build failed
- failed to find Build Tools revision 23.0.2 Install Build Tools 23.0.2 and sync project