添加apk命令

This commit is contained in:
葛佳祥 2024-03-18 10:35:54 +08:00
parent bfe8cc626f
commit a4e83144c8
3 changed files with 25 additions and 1 deletions

View File

@ -143,3 +143,26 @@ Xcode顶部中间设备选择器左边Runner选择下拉选择Edit Scheme
截图完成记得将Runner改回去不然编译出来的sky是debug版的。 截图完成记得将Runner改回去不然编译出来的sky是debug版的。
最后还是随便截图的然后用PS裁剪成要求的分辨率上传了 最后还是随便截图的然后用PS裁剪成要求的分辨率上传了
## 用于aab文件转apk
安装bundletool.jar(该文件在git忽略每个机器需要自行下载)
```bash
wget -o android/bundletool.jar https://github.com/google/bundletool/releases/download/1.15.6/bundletool-all-1.15.6.jar
```
将aab转为apk
```bash
java -jar android/bundletool.jar build-apks --bundle=build/app/outputs/bundle/skyRelease/app-sky-release.aab \
--output=build/app/outputs/bundle/skyRelease/app-sky-release.aab.apks \
--ks=android/app/sky.jks \
--ks-pass=pass:sky2028 \
--ks-key-alias=upload \
--key-pass=pass:sky2028
```
安装apks文件到手机
```bash
java -jar android/bundletool.jar install-apks --apks=build/app/outputs/bundle/skyRelease/app-sky-release.aab.apks
```

View File

@ -1,4 +1,5 @@
gradle-wrapper.jar gradle-wrapper.jar
bundletool.jar
/.gradle /.gradle
/captures/ /captures/
/gradlew /gradlew

View File

@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.17+2024031401 version: 1.0.15+2024031501
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'