From 4c86403da9f5306993551b50b0ca6a89b51e6bae Mon Sep 17 00:00:00 2001 From: zhaodengke Date: Wed, 5 Mar 2025 09:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ gradle.properties | 4 ++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b83ebd --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +## NSGK App + +> 首页地址列表 + +| 名称 | 地址(实际需自行添加协议,地址,端口) | 图标 | 圆角图标 | +|:-----|:-----|:-----|:-----| +| 事项审批 | /yinnongLogin | ic_launcher_sxsp 或者 ic_launcher_yhzl | ic_launcher_sxsp_round 或者 ic_launcher_yhzl_round | +| 阳光村务(村级事项) | /sunVillage_info/login | ic_launcher_ygcw | ic_launcher_ygcw_round | +| 大托管 | /agriculturalTrusteeship/index | ic_launcher_dtg | ic_launcher_dtg_round | +| 产权交易 | /index | ic_launcher_cqjy | ic_launcher_cqjy_round | +| 农业执法 | /lawEnforcement/login | ic_launcher_nyzf | ic_launcher_nyzf_round | +| 宅基地审批(乌市版) | /zjdLogin | ic_launcher_zjd | ic_launcher_zjd_round | +| 宅基地调查 | /homesteadLogin | ic_launcher_zjddc | ic_launcher_zjddc_round | +| 两清三化 | /homestead/login | ic_launcher_2q3h | ic_launcher_2q3h_round | +| 网上家园(废) | /onlineHomeLogin | ic_launcher_white | ic_launcher_white_round | +| 确权调查 | /contracted/login | ic_launcher_qqdc | ic_launcher_qqdc_round | +| 一体机 | / | ic_launcher_njytj | ic_launcher_njytj_round | + +> 使用`Android Studio`修改步骤 + +* 编辑`gradle.properties`文件 +* 配置```appHomeUrl=```首页地址, 不要加双引号 +* 配置```appName=```App桌面快捷方式名称, 可以直接使用字符串(需要加双引号, 如 "NSGK APP"), 也可以使用国际化字符串配置(不要加双引号, 如 @string/app_name) +* 配置```appIconKey=```图标名称, 不要加双引号, 去掉前后缀(如 yhzl, 图标为ic_launcher_yhzl; 圆角图标为ic_launcher_yhzl_round) +* 使用Android Studio生成签名包 +* 生成的apk路径为 `/app/release/app-release.apk` + +> 使用`gradle`脚本打签名的正式包 + +* 执行 ```gradlew assembleRelease``` 将使用`gradle.properties`文件里的配置进行打包 +* 如果需要自定义配置(无需修改`gradle.properties`文件), 执行 ```gradlew assembleRelease -PappHomeUrl="首页地址" -PappName="App桌面快捷方式名称(只能使用字符串)" -PappIconKey="图标名称"``` 将使用命令行里的配置进行打包 +* 生成的apk路径为 `/app/build/outputs/apk/release/app-release.apk` + +> 帮助脚本 + +* `打包-正式.bat`: 构建正式包(直接执行将使用`gradle.properties`文件里的配置进行打包, 完整命令行用法为 .\打包-正式.bat App主页链接地址 App名称 App图标, 此时会使用命令行里的配置进行打包. 生成的路径为`/app/build/outputs/apk/release/app-release.apk`) +* `打包-debug.bat`: 构建Debug包(生成的路径为`/app/build/outputs/apk/debug/app-debug.apk`) +* `安装-发布包.bat`: 将已打好的Release包安装至手机(手机需连接到电脑, 并且启用开发者模式) +* `安装-调试包.bat`: 将已打好的Debug包安装至手机(手机需连接到电脑, 并且启用开发者模式) + +> 签名证书 + +* 路径: `/app-keystore.jks` +* 密码: `ns61GK32x%` +* Key Alias: `nsgk_rural_web` +* Key Password: `ns61GK32x%` \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 092f289..399f062 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,9 +23,9 @@ keyAlias=nsgk_rural_web keyPassword=ns61GK32x% # Command line arguments -# ["String"] App home url +# [String] App home url appHomeUrl=http://218.59.175.43:71/yinnongLogin -# ["String"] App custom name, it will be set on res/values/strings.xml with key app_custom_name +# [String] App custom name, it will be set on res/values/strings.xml with key app_custom_name appName=@string/app_name # [String] App icon mipmap key name in res/mipmaps, icon = ic_launcher_${appIconKey}, round icon = ic_launcher_${appIconKey}_round appIconKey=yhzl \ No newline at end of file