wgt结构
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20241022/70a57214403e8c7e04172d3989b58e0d.png)
引入的lib如下
打开的代码如下
{
try {
MenuActionSheetItem item = new MenuActionSheetItem("关于", "about");
List<MenuActionSheetItem> sheetItems = new ArrayList<>();
sheetItems.add(item);
DCSDKInitConfig uniConfig = new DCSDKInitConfig.Builder()
.setCapsule(true)
.setMenuDefFontSize("16px")
.setMenuDefFontColor("#ff00ff")
.setMenuDefFontWeight("normal")
.setMenuActionSheetItems(sheetItems)
.setEnableBackground(false)//开启后台运行
.build();
DCUniMPSDK.getInstance().initialize(mContext, uniConfig, new IDCUniMPPreInitCallback() {
@Override
public void onInitFinished(boolean b) {
log("onInitFinished"+b);
}
});
}
catch (Exception e){
log("wfwooooooo");
log("wfwinit"+e);
}
try {
UniMPOpenConfiguration uniMPOpenConfiguration = new UniMPOpenConfiguration();
uniMPOpenConfiguration.splashClass = MySplashView.class;
uniMPOpenConfiguration.extraData.put("darkmode","light");
log("wfw112");
log(mContext);
// SoftReference<IUniMP> mallMP = new SoftReference<>(DCUniMPSDK.getInstance().openUniMP(mContext, "__UNI__F743940", uniMPOpenConfiguration));
IUniMP uniMP = DCUniMPSDK.getInstance().openUniMP(mContext,"__UNI__131D0E4", uniMPOpenConfiguration);
} catch (Exception e) {
e.printStackTrace();
}
JSONObject jsonObject = DCUniMPSDK.getInstance().getAppVersionInfo("__UNI__131D0E4");
if(jsonObject != null) {
log("__UNI__04E3A11版本信息为"+jsonObject.toString());
}
}
点击之后 无任何报错 也打不开小程序
D/Noodle: com.ddky.orderpicker.loginActivity$1$1 -> onInitFinished: onInitFinishedtrue
D/Noodle: com.ddky.orderpicker.loginActivity$1 -> onClick: wfw112
D/Noodle: com.ddky.orderpicker.loginActivity$1 -> onClick: com.ddky.orderpicker.loginActivity@21b6df6
I/Quality: Skipped: false 1 cost 14.117581 refreshRate 8308467 bit true processName com.ddky.orderpicker