[图片] 是的我有看到这种解决方式,我在manifest中添加了,华为手机依然报上面的错误提示信息;我的微信账号创建的应用是未上线版本,与这个微信平台未上线版本是否有关系呢?
华为鸿蒙4.0系统调用微信分享功能无法分享?微信分享sdk:api "com.tencent.mm.opensdk:wechat-sdk-android:+" 微信app版本:8.0.47.2560 问题描述:我的app集成了微信分享sdk,调用分享功能时报错: Failed to find provider info for com.tencent.mm.sdk.comm.provider getTokenFromWX , token is null , if your app targetSdkVersion >= 30, include 'com.tencent.mm' in a set of <package> elements inside the <queries> element 我分享的代码: private fun sendMsg(msgStr:String,title:String){ api = WXAPIFactory.createWXAPI(this, Constant.WX_APP_ID, false) val textObj = WXTextObject() textObj.text = title val msg = WXMediaMessage() msg.mediaObject = textObj // msg.title = "Will be ignored"; // msg.title = "Will be ignored"; msg.description = msgStr msg.mediaTagName = "我是mediaTagName啊" val req = SendMessageToWX.Req() req.transaction = buildTransaction("text") req.message = msg req.scene = SendMessageToWX.Req.WXSceneSession api?.sendReq(req) }
03-21