admin管理员组文章数量:1516870
最近做混合开发,项目要接入微信登陆,于是屁颠屁颠去使用cordova-plugin-wechat,一步步看着文档弄好了,支付分享什么的都没有问题,唯独登陆一直没响应,网上各种查找也没头绪,于是我就去logcat 看日志,日志报了下面的错误错误,
Failed resolution of: Lorg/apache/http/client/methods/HttpPost
然后各种网上找资料说高版本安卓缺少了org.apache.http.legacy,于是查资料在config.xml加上了org.apache.http.legacy配置
<config-file parent="/manifest/application" target="AndroidManifest.xml"><uses-library android:name="org.apache.http.legacy" android:required="false" /></config-file>加完之后错误没有了,但是依然没有回调,本人非安卓出身,各种查资料依然无法解决,于是网上找了一份安卓微信登陆的源码,从头到位看了一遍,发现多了一个activity配置于是在config.xml加上了这个配置,
<config-file parent="/manifest/application" target="AndroidManifest.xml"><activity
android:name=".wxapi.WXEntryActivity"
android:label="WXEntryActivity"
android:exported="true" /></config-file>httpPost异常
Failed resolution of: Lorg/apache/http/client/methods/HttpPost
在conffig.xml加上
<config-file parent="/manifest/application" target="AndroidManifest.xml"><uses-library android:name="org.apache.http.legacy" android:required="false" /></config-file>登陆不回调
在conffig.xml加上
<config-file parent="/manifest/application" target="AndroidManifest.xml"><activity
android:name=".wxapi.WXEntryActivity"
android:label="WXEntryActivity"
android:exported="true" /></config-file>参考资料
版权声明:本文标题:Cordova与WeChat登陆对接实战:常见问题与解决之道 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/web/1772299110a3273284.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论