本地代码才11.1 MB (11,653,120 字节)。本地运行后生成一个unpackage 包,这个包好像是类似VUE的build里面的大小也才16MD。结果云打包后APK的大小有30多MB。我有使用到两个插件但是这个两个插件一个已经下载到本地了,一个是云打包时开机自启动
APP更新
还有两个插件是下载了代码本地使用的但是并没有集成到云打包的这个项目中
阿里云自能语音
智能语音
{
"name" : "",
"appid" : "",
"description" : "",
"versionName" : "1.1.2",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : false,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {
"Barcode" : {},
"Camera" : {},
"Bluetooth" : {},
"Speech" : {}
},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.UPDATE_DEVICE_STATS\"/>", // 更新设备状态 更新设备状态
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>", // 使用蓝牙 允许程序连接配对过的蓝牙设备
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>" // 蓝牙管理 允许程序进行发现和配对新的蓝牙设备
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
},
/* ios打包配置 */
"ios" : {
"dSYMs" : false,
"idfa" : false
},
/* SDK配置 */
"sdkConfigs" : {
"ad" : {},
"speech" : {}
},
"icons" : {
"android" : {
"hdpi" : "static/icons/72x72.png",
"xhdpi" : "static/icons/96x96.png",
"xxhdpi" : "static/icons/144x144.png",
"xxxhdpi" : "static/icons/192x192.png"
}
},
"splashscreen" : {
"iosStyle" : "common"
}
},
"nativePlugins" : {
"Fvv-AutoStart" : {
"__plugin_info__" : {
"name" : "Fvv-AutoStart",
"description" : "uni-app 安卓开机自启动插件",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=1820",
"android_package_name" : "已删除",
"isCloud" : true,
"bought" : 1,
"pid" : "1820",
"parameters" : {}
}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : false
},
"mp-alipay" : {
"usingComponents" : false
},
"mp-baidu" : {
"usingComponents" : false,
"setting" : {
"urlCheck" : false
}
},
"mp-toutiao" : {
"usingComponents" : false,
"setting" : {
"urlCheck" : false
}
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2",
"h5" : {
"devServer" : {
"https" : false
}
},
"mp-qq" : {
"setting" : {
"urlCheck" : false
}
}
}
1***@163.com (作者)
谢谢,我测试删除掉后打包看看大小
2024-11-13 16:19
1***@163.com (作者)
删除掉了,但是大小也只是从28.6 MB (30,044,160 字节)减到23.2 MB (24,420,352 字节)。以前这个才16mb
2024-11-13 17:09