版本比较

密钥

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。
目录

a multi-core X86 host with a minimum requirement of 16GB of RAM and a minimum disk size of 512GB.

...

  • Execute gradle and build the apk

代码块
./gradlew build

Helpful tip: During the process of building an APK using this command, the Gradle installation package will be downloaded first. If the build process is taking a long time, you can follow the four steps below to speed up this step.

Step 1: Execute the command ./gradlew build, which will generate a directory. In the example given below, it is /root/.gradle/wrapper/dists/gradle-7.6-bin/9l9tetv7ltxvx3i8an4pb86ye/. Please locate the folder generated in your own gradle-7.6-bin directory.

...

Step 2: Manually download the Gradle installation package.
9l9tetv7ltxvx3i8an4pb86ye with your own directory name.

代码块
wget https://services.gradle.org/distributions/gradle-7.6-bin.zip

...

Step 3: Copy the Gradle archive to the generated directory. Make sure to replace 9l9tetv7ltxvx3i8an4pb86ye with your own directory name.

代码块
cp gradle-7.6-bin.zip /root/.gradle/wrapper/dists/gradle-7.6-bin/9l9tetv7ltxvx3i8an4pb86ye/

Step 4: Execute the build process again. This time, the build process will be much faster!

代码块
./gradlew build

Note: Due to the requirement of sdkmanager to run on Java 17 and the limitation of compiling APKs on Java 11, it is necessary to reset JAVA_HOME to Java 11. Compiling with Java 17 will result in the following error.

...