Help Center/
CodeArts Build/
FAQs/
Using Gradle for Build/
Failing to Find Gradle of the Specified Version
Updated on 2024-10-10 GMT+08:00
Failing to Find Gradle of the Specified Version
Symptoms
Failed to find the required Gradle version during action editing.
Cause Analysis
- If the Gradle version on which a project to be compiled depends is not in the list, you can use gradlew(gradle wrapper) to encapsulate Gradle commands.
- The Gradle commands are encapsulated in Gradlew. The Gradle of the specified version will be installed before the build commands are executed.
- Gradle recommends that Wrapper files be created in all Gradle projects to facilitate users who have not installed Gradle.
Using Gradle Wrapper
- In the local environment, go to the root directory of the code and run the Gradle Wrapper command. After the command is executed, the following files are added to the code repository:
- gradlew (Unix Shell script)
- gradlew.bat (Windows batch processing file)
- gradle/wrapper/gradle-wrapper.jar (Wrapper JAR file)
- gradle/wrapper/gradle-wrapper.properties (Wrapper file)
- Commit the code to the code repository.
- Modify the statement in the command line of the build task and replace gradle with ./gradlew. For example, replace gradle build with ./gradlew build.
Parent topic: Using Gradle for Build
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot