Comments (12)
@junmin 你的应用是否在微信里面注册并审核通过了?android的分享是需要你的应用被审核通过(当然你的签名和包名和审核过的应用需要一致)。
还有,日志里面有什么错误么?
from cordova-plugin-wechat.
应用已经在微信开放平台注册了也并通过了(有绿色的“已通过”)
审核通过后,我有改动过包名和签名,这个会有影响吗?(微信平台里没有说需要再审核)
我是移动开发方面的新手,今天一直在摸索SDK如何查看日志和debug
因为用的是ionic, 目前用到的debug工具基本上就是chrome (remote) inspector
Cordova 方面的debug无从下手,在网上google了一番也没找到好的方法,你可以给点提示或者资料来学习一下吗?
from cordova-plugin-wechat.
刚用logcat看到这些信息,但是看不出来有什么问题 :s
D/Cordova.Plugin.Wechat( 9368): share is called.
D/Cordova.Plugin.Wechat( 9368): Start building message.
I/ActivityManager( 749): START u0 {flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXEntryActivity (has extras)} from uid 10199 on display 0
V/WindowManager( 749): addAppToken: AppWindowToken{1378d279 token=Token{2bc8c340 ActivityRecord{27286ec3 u0 com.tencent.mm/.plugin.base.stub.WXEntryActivity t13371}}} to stack=1 task=13371 at 0
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): com.mohuatang.webapp.MainActivity onActivityPaused
D/Cordova.Plugin.Wechat( 9368): Message sent.
W/ActivityManager( 749): getTasks: caller 10076 does not hold GET_TASKS; limiting output
V/WindowManager( 749): Adding window Window{2b16d36c u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.WXEntryActivity} at 6 of 12 (after Window{2f68930a u0 com.mohuatang.webapp/com.mohuatang.webapp.MainActivity})
D/EventService( 2076): EventService : com.ifeng.ipush.client.EVENT_ORDER_TYPE_ALARM
D/AndroidHelper( 2076): checkService result : true
D/PushService( 2076): Send a heartBeat To Server
V/WindowManager( 749): Adding window Window{2253ba58 u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.WXEntryActivity} at 6 of 13 (before Window{2b16d36c u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.WXEntryActivity})
D/EventService( 2076): W:Service not registered: acj@122c2533
I/ActivityManager( 749): Displayed com.tencent.mm/.plugin.base.stub.WXEntryActivity: +244ms
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): WXStat trigger onBackground
W/ActivityManager( 749): Finishing task with all activities already finished
W/ActivityManager( 749): Duplicate finish request for ActivityRecord{27286ec3 u0 com.tencent.mm/.plugin.base.stub.WXEntryActivity t13371 f}
W/ResourceType( 908): No package identifier when getting value for resource number 0x00000000
I/Keyboard.Facilitator( 4568): onFinishInput()
W/IInputConnectionWrapper( 9368): showStatusIcon on inactive InputConnection
W/PackageManager( 908): Failure retrieving resources for com.mohuatang.webapp: Resource ID #0x0
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): com.mohuatang.webapp.MainActivity onActivityResumed
I/Keyboard.Facilitator( 4568): onFinishInput()
W/ActivityManager( 749): getTasks: caller 10076 does not hold GET_TASKS; limiting output
D/WearableService(13141): callingUid 10007, callindPid: 13141
W/ActivityManager( 749): getTasks: caller 10076 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): WXStat trigger onForeground
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
from cordova-plugin-wechat.
@junmin 可能需要重新审核,这个我不清楚。我觉得能打开微信,插件的任务基本完成了,至于闪退或者分享后没有回到原来的应用,就是设置的问题了。
你可以先试试我的那个demo,也是ionic的。
from cordova-plugin-wechat.
@xu-li 已经试过demo, 一样的情况 :s
from cordova-plugin-wechat.
@xu-li 在idea里debug了一下android这边,看到拿到的WechatAppId是"$WechatAppId",不知道怎么解决这个
from cordova-plugin-wechat.
@wgjtyu 好的,多谢提供这个重要的细节。应该是安装插件的时候,变量没有被替换。
from cordova-plugin-wechat.
再次尝试了一下,把WechatAppId改成WECHATAPPID就好了
在 2015年7月23日,下午10:04,lixu [email protected] 写道:
@wgjtyu https://github.com/wgjtyu 好的,多谢提供这个重要的细节。应该是安装插件的时候,变量没有被替换。
—
Reply to this email directly or view it on GitHub #46 (comment).
from cordova-plugin-wechat.
@wgjtyu 是哪个文档的变量?
from cordova-plugin-wechat.
@xu-li 确认是插件的问题,我试用了另外一个插件 https://github.com/vilic/cordova-plugin-wechat 分享没有问题,也就是说app_id和应用签名,包名都配置正确;但是这个插件目前的功能太少了,所以我看看能不能debug一些东西出来,然后在这里反馈给你。如果你有时间的话,麻烦你也看看吧,相信随便找个安卓也能reporduct这个问题。
from cordova-plugin-wechat.
参考了 @wgjtyu 的反馈,发现是同一个问题,安装插件的时候没有自动替换所有的变量。我收到修改了下面的文档,把里面$WechatAppId替换成自己的app_id就好了。估计项目最后的一个更新没有测试就push上去了 不带这样玩的阿,哈哈,不过还是谢谢 @xu-li 的项目,还是为大家省了不少功夫~
platforms/android/AndroidManifest.xml
platforms/android/res/xml/config.xml
plugins/android.json
from cordova-plugin-wechat.
@junmin 真不好意思。下次要好好测试一下。
这个问题应该是plugin.xml里面不支持大小写混用的,只要是WECHATAPPID就能正确替换。
同时也感谢 @wgjtyu。
from cordova-plugin-wechat.
Related Issues (20)
- ionic3 分享跳转到微信 分享完成后点击回到应用没有反应 HOT 2
- 最新版3.0.0的ios分享失败,没有报错,打开不了微信, HOT 3
- 安卓11分享闪退
- Android通过查看日志发现wechat.auth有返回值,但是wechat.auth的success回调没有接收到 HOT 5
- The app is blocked from being shared. Unable to share on WeChat. HOT 1
- 支援AppID動態設定
- Capacitor can't get any response from Wechat.auth() HOT 4
- 安卓10 分享微信,提示"未安装微信" HOT 3
- capacitor 如何配置? HOT 5
- 微信的wxapi.WXEntryActivity及wxapi.WXPayEntryActivity的的建议
- 无法分享微信或者验证,反复跳转 HOT 2
- 安卓分享小程序闪退
- HarmonyOS 未授权存储权限,点击分享到微信。应用闪退 HOT 3
- 部分安卓机型调用分享小程序闪退
- Build fail on M1 Mac
- 安卓11系统以上分享文件异常 HOT 1
- BSF软件基金会(最新可用版本) HOT 2
- Capacitor 支付成功没有回调 HOT 1
- Cordova打包的iOS应用,调用微信支付时,出现“发送请求失败”错误
- 在ios中,使用微信分享好友或微信分享朋友圈,造成内存泄漏,程序卡死退出
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-wechat.