Skip to content

Commit 23b7889

Browse files
committed
Update README.md
1 parent db0689a commit 23b7889

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,27 @@ lib目录:
7777

7878
你需要配置好flutter和安卓sdk,还需安装python3、bison、patch、gcc,然后克隆此项目。
7979

80-
在编译之前,需要在release中下载系统rootfs(或者[自行制作](extra/build-tiny-rootfs.md)),之后使用split命令分割,拷贝到assets。一般我将其分为98MB。
80+
在编译之前,需要在release中下载patch.tar.gz拷贝到assets;以及下载系统rootfs(或者[自行制作](extra/build-tiny-rootfs.md)),之后使用split命令分割,拷贝到assets。一般我将其分为98MB。
8181

8282
`split -b 98M debian.tar.xz`
8383

8484
还需要对flutter的一些默认配置作修改,因为其与项目中build.gradle的一些设置冲突。
85-
- 删除`flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。
85+
- 注释或删除`flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。
86+
```groovy
87+
// if (shouldShrinkResources(project)) {
88+
// release {
89+
// // Enables code shrinking, obfuscation, and optimization for only
90+
// // your project's release build type.
91+
// minifyEnabled(true)
92+
// // Enables resource shrinking, which is performed by the Android Gradle plugin.
93+
// // The resource shrinker can't be used for libraries.
94+
// shrinkResources(isBuiltAsApp(project))
95+
// // Fallback to `android/app/proguard-rules.pro`.
96+
// // This way, custom Proguard rules can be configured as needed.
97+
// proguardFiles(project.android.getDefaultProguardFile("proguard-android-optimize.txt"), flutterProguardRules, "proguard-rules.pro")
98+
// }
99+
// }
100+
```
86101

87102
接下来就可以编译了。我使用的命令如下:
88103

0 commit comments

Comments
 (0)