build的时候出现红色的告警:
:preDexDebugwarning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.b.b) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
执行“发送Text消息给微信”等操作报“Failed:未知错误”
在我的平板上测试 ionic run android,执行“发送Text消息给微信”等操作报“Failed:授权失败”
logcat:
"发送Text消息给微信"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@2f4321ac
"发送Photo消息给微信(本地图片)"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null
E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389)
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818)
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@b83cf57
"发送Photo消息给微信(远程图片)"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null
E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389)
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818)
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@22870461
“微信授权登录”没有反应:
D/Cordova.Plugin.Wechat( 7152): sendAuthRequest is called.
我首先git clone https://github.com/xu-li/cordova-plugin-wechat-example.git
然后cd ionic执行:
build的时候出现红色的告警: :preDexDebugwarning: Ignoring InnerClasses attribute for an anonymous inner class (com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class. warning: Ignoring InnerClasses attribute for an anonymous inner class (com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$2) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class. warning: Ignoring InnerClasses attribute for an anonymous inner class (com.tencent.mm.sdk.b.b) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class.
执行“发送Text消息给微信”等操作报“Failed:未知错误”
在我的平板上测试 ionic run android,执行“发送Text消息给微信”等操作报“Failed:授权失败”
logcat:
"发送Text消息给微信"报“Failed:未知错误” D/Cordova.Plugin.Wechat( 7152): share is called. D/Cordova.Plugin.Wechat( 7152): Start building message. D/Cordova.Plugin.Wechat( 7152): Message sent. D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@2f4321ac
"发送Photo消息给微信(本地图片)"报“Failed:未知错误” D/Cordova.Plugin.Wechat( 7152): share is called. D/Cordova.Plugin.Wechat( 7152): Start building message. E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389) E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550) E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335) E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263) E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151) E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818) D/Cordova.Plugin.Wechat( 7152): Message sent. D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@b83cf57
"发送Photo消息给微信(远程图片)"报“Failed:未知错误” D/Cordova.Plugin.Wechat( 7152): share is called. D/Cordova.Plugin.Wechat( 7152): Start building message. E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389) E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550) E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335) E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263) E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151) E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818) D/Cordova.Plugin.Wechat( 7152): Message sent. D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@22870461
“微信授权登录”没有反应: D/Cordova.Plugin.Wechat( 7152): sendAuthRequest is called.