mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-21 00:45:49 +08:00
Update README.md
This commit is contained in:
19
README.md
19
README.md
@@ -77,12 +77,27 @@ lib目录:
|
||||
|
||||
你需要配置好flutter和安卓sdk,还需安装python3、bison、patch、gcc,然后克隆此项目。
|
||||
|
||||
在编译之前,需要在release中下载系统rootfs(或者[自行制作](extra/build-tiny-rootfs.md)),之后使用split命令分割,拷贝到assets。一般我将其分为98MB。
|
||||
在编译之前,需要在release中下载patch.tar.gz拷贝到assets;以及下载系统rootfs(或者[自行制作](extra/build-tiny-rootfs.md)),之后使用split命令分割,拷贝到assets。一般我将其分为98MB。
|
||||
|
||||
`split -b 98M debian.tar.xz`
|
||||
|
||||
还需要对flutter的一些默认配置作修改,因为其与项目中build.gradle的一些设置冲突。
|
||||
- 删除`flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。
|
||||
- 注释或删除`flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。
|
||||
```groovy
|
||||
// if (shouldShrinkResources(project)) {
|
||||
// release {
|
||||
// // Enables code shrinking, obfuscation, and optimization for only
|
||||
// // your project's release build type.
|
||||
// minifyEnabled(true)
|
||||
// // Enables resource shrinking, which is performed by the Android Gradle plugin.
|
||||
// // The resource shrinker can't be used for libraries.
|
||||
// shrinkResources(isBuiltAsApp(project))
|
||||
// // Fallback to `android/app/proguard-rules.pro`.
|
||||
// // This way, custom Proguard rules can be configured as needed.
|
||||
// proguardFiles(project.android.getDefaultProguardFile("proguard-android-optimize.txt"), flutterProguardRules, "proguard-rules.pro")
|
||||
// }
|
||||
// }
|
||||
```
|
||||
|
||||
接下来就可以编译了。我使用的命令如下:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user