美文网首页
微信原生登录Appid包名签名都正确却无法拉起授权界面,回调方法

微信原生登录Appid包名签名都正确却无法拉起授权界面,回调方法

作者: 后来Memory | 来源:发表于2019-01-16 16:18 被阅读0次

进行三方微信登录,在包名,签名,appid,所有条件都正确的情况下,仍然无法拉起授权界面~! 清除手机上的微信缓存或者退出微信重新登录就ok!

关于回调无响应问题
设置回调不走不在描述,官方写得很清楚!
写两个注意点
1.包名建议使用全路径

android:name="shopping.myapplication.wxapi.WXEntryActivity"

2.在WXEntryActivity当中

public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
       super.onCreate(savedInstanceState, persistentState);

去除掉@Nullable PersistableBundle persistentState 不然无法回调,换成如下

public void onCreate(@Nullable Bundle savedInstanceState) {
       super.onCreate(savedInstanceState,);

相关文章

网友评论

      本文标题:微信原生登录Appid包名签名都正确却无法拉起授权界面,回调方法

      本文链接:https://www.haomeiwen.com/subject/govmdqtx.html