声明:仅供学习使用
项目配置
project.json文件用于配置项目的相关参数,比如主文件、启动图、包名等信息。
参数名称 | 意义 | 类型 | 默认值 |
---|
androidResources | 安卓资源,参见androidResources | Object | {“resDir”: “res”,“manifest”: “AndroidManifest.xml”} | build | 自动生成的构建信息,无需修改,参见build | Object | | encryptLevel | 加密级别 ,0-不加密, 1-本地加密, 2-在线加密(仅在8.7以上版本支持) | number | 0 | icon | 桌面图标 | string | “icons/icon.png” | ignore | 从VSCode中同步项目时的忽略文件 | Array | [“build”] | launchConfig | 启动配置,参见launchConfig | Object | | main | 入口文件 | string | “main.js” | name | app名字 | string | “” | optimization | 优化配置,参见optimization | Object | | packageName | 包名,必须符合Android包名规范,另外上传商店时包名必须唯一 | string | “” | permissionConfig | 权限配置,参见permissionConfig | Object | {“manifestPermissions”: [],“requestListOnStartup”: []} | publish | 发布/上传商店配置,参见publish | Object | | useFeatures | 特性continuation- 是否使用协程特性,参见示例->协程 | Array | [] | versionCode | 版本号 | number | 1 | versionName | 给用户看的版本名称 | string | “1.0.0” |
完整配置
{
"androidResources": {
"resDir": "res",
"manifest": "AndroidManifest.xml"
},
"assets": [],
"build": {
"build_id": "6F47F367-1",
"build_number": 1,
"build_time": 1615553004812,
"release": true
},
"encryptLevel": 0,
"useFeatures": [],
"icon": "res/icon.png",
"ignore": ["build"],
"launchConfig": {
"displaySplash": true,
"hideLogs": false,
"splashIcon": "res/splashIcon.png",
"splashLayoutXml": "splash.xml",
"splashText": "Powered by Auto.js Pro",
"stableMode": false
},
"main": "main.js",
"name": "Shape3.0",
"optimization": {
"removeOpenCv": true,
"unusedResources": true
},
"packageName": "com.suzy.rippledrawable",
"permissionConfig": {
"manifestPermissions": ["android.permission.WRITE_EXTERNAL_STORAGE"],
"requestListOnStartup": ["android.permission.WRITE_EXTERNAL_STORAGE"]
},
"publish": {
"category": "其他",
"details": "控件描边、渐变、水波纹、文字渐变",
"maxAutoJsVersion": -1,
"minAutoJsVersion": -1,
"maxProVersion": 8059999,
"minProVersion": 8050000,
"minSdkVersion": 2,
"permissions": [],
"summary": "控件描边、渐变、水波纹、文字渐变",
"tags": []
},
"scripts": {},
"versionCode": 1,
"versionName": "1.0.0"
}
|