用官方SDK-demo拉起小程序失败
String appId = "wxdfdf77f764395497";
String userName="gh_c6510fd44b5f";
String path="pages/AppPay/AppPay";
IWXAPI api = WXAPIFactory.createWXAPI(this, appId);
WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
req.userName = userName; // 填小程序原始id
req.path = path;//拉起小程序页面的可带参路径,不填默认拉起小程序首页
req.miniprogramType = WXLaunchMiniProgram.Req.MINIPROGRAM_TYPE_TEST;// 可选打开 开发版,体验版和正式版
boolean r = api.sendReq(req);
[图片]