Source code compilation

This article organizes how to deal with problems related to source code compilation, so as to quickly locate the cause and complete the repair.

Problem 1: The official website packaging and compilation command cannot download gradle

Solution

手动下载gradle安装包,解压到gradle默认路径 `${user_home_dir}/.gradle/wrapper/dists` 下

Gradle8.7 download address: https://services.gradle.org/distributions/gradle-8.7-bin.zIP

unzip gradle-8.7-bin.zip
cp gradle-8.7 ~/.gradle/wrapper/dists/gradle-8.7-bin
cd ~/spark-yun
./gradlew package start

20241022103809

Problem 2: Idea cannot start the project

The error is reported as follows:

20250422142959

Solution

Modify startup item configuration

20250422143104

20250422143028

Problem 3: Git bash packaging is garbled

Set the character set of git bash

20250423155751

./gradlew.bat install -Dfile.encoding=UTF-8