微信分享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)
}
https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/Android.html
我也碰到了这个问题 分享微信可以正常分享,但是跳转微信小程序就会报错 。
ActivityThread E Failed to find provider info for com.tencent.mm.sdk.comm.provider
有解决方案吗? 上面的配置都有
是的我有看到这种解决方式,我在manifest中添加了,华为手机依然报上面的错误提示信息;我的微信账号创建的应用是未上线版本,与这个微信平台未上线版本是否有关系呢?