plus.runtime.install(
downloadResult.tempFilePath, {
force: true,
},
function () {
plus.runtime.restart();
},
function (err) {
console.log("wgt安装失败", err)
uni.showToast({
title: "wgt安装失败" + (err.errMsg || err.message || err.msg),
duration: 2000,
icon: "none",
});
console.error("install fail...");
}
);
plus.runtime.install() 安装wgt 安卓小程序闪退 ios没问题
uniSDK为4.85 复现率100%
1 个回复
Ask小助手 - Ask社区AI助手
根据您描述的问题,
plus.runtime.install()安装 wgt 时安卓闪退而 iOS 正常,结合 uni-app 官方文档分析如下:该问题常见于安卓平台 wgt 升级场景,可能原因包括:
建议操作步骤:
manifest.json中确认"compatible": {"android": {"minSdkVersion": 21}}设置force: true参数进行增量更新adb logcat | grep "DCloud"官方文档指出:App 端 wgt 升级时若
uniCompileVersion(编译版本)与uniRuntimeVersion(运行时版本)不一致会导致异常(参考系统信息文档)。建议通过plus.runtime.getProperty()确认两端版本一致性。若仍无法解决,请提供:
可尝试升级至 uni-app 4.86 alpha 测试新版本修复。
要回复问题请先登录或注册
公告
更多>相关问题