起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4048|回复: 13

[处理中3] 如何用模式4生成一个集成Jpush消息推送的app

[复制链接]

3

主题

14

帖子

30

积分

新手上路

Rank: 1

积分
30
QQ
发表于 2016-7-12 17:36:15 | 显示全部楼层 |阅读模式
我的操作如下:
1、我在jpush官方网站,新建一个项目。获取到了appkey和包名。
2、新建一个本地APP,选择模式4,进入后填写要访问的域名,例如http://www.baidu.com,应用包名也填写了jpush官网上项目的包名,在最后一步选择插件时,选择了jpush消息推送,在key 里填写了jpush官网上项目的appkey。
3、在jpush官网发一条通知,没有反应,官网安卓目标用户数为0,手机APP也收不到消息。

请问,正确的操作应该是怎么样的,才能收到消息通知呢?
发表于 2016-7-15 17:35:45 | 显示全部楼层
kan180 发表于 2016-7-15 12:04
你好,多谢你的回复帮忙,我是用wex5开发工具,在native那块新建一个本地安卓APP,然后使用模式4,在最后 ...

这样吧!3.5正式版 已经把cordova 插件升级过了!使用新版本再试试看
qq:1912779713
WeX5教程--WeX5下载
回复 支持 1 反对 0

使用道具 举报

3

主题

14

帖子

30

积分

新手上路

Rank: 1

积分
30
QQ
 楼主| 发表于 2016-7-13 08:43:44 | 显示全部楼层
顶起来
回复

使用道具 举报

12

主题

133

帖子

473

积分

中级会员

Rank: 3Rank: 3

积分
473
QQ
发表于 2016-7-13 10:58:07 | 显示全部楼层
webx5是什么版本?
模式4打包插件只能收到广播通知
回复 支持 反对

使用道具 举报

3

主题

14

帖子

30

积分

新手上路

Rank: 1

积分
30
QQ
 楼主| 发表于 2016-7-13 11:56:34 | 显示全部楼层
aa123 发表于 2016-7-13 10:58
webx5是什么版本?
模式4打包插件只能收到广播通知

最新的3.5版本,我安装上面的方式,也收不到广播通知。
回复 支持 反对

使用道具 举报

12

主题

133

帖子

473

积分

中级会员

Rank: 3Rank: 3

积分
473
QQ
发表于 2016-7-13 11:59:23 | 显示全部楼层
kan180 发表于 2016-7-13 11:56
最新的3.5版本,我安装上面的方式,也收不到广播通知。

那就不知道了
回复 支持 反对

使用道具 举报

2

主题

258

帖子

345

积分

中级会员

Rank: 3Rank: 3

积分
345
QQ
发表于 2016-7-13 16:14:04 | 显示全部楼层
看一下这个帖子,写的很详细:http://bbs.wex5.com/forum.php?mo ... 9%E6%8E%A8%E9%80%81
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35942
发表于 2016-7-13 18:33:05 | 显示全部楼层
模式4打包使用Cordova插件可以参考http://docs.wex5.com/mode4-cordova/
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

3

主题

14

帖子

30

积分

新手上路

Rank: 1

积分
30
QQ
 楼主| 发表于 2016-7-13 18:54:00 | 显示全部楼层
wangdan 发表于 2016-7-13 16:14
看一下这个帖子,写的很详细:http://bbs.wex5.com/forum.php?mod=viewthread&tid=96132&highlight=%E6%9E% ...

按这个文档操作,出现如下错误:
FAILURE: Build failed with an exception.
   
   * What went wrong:
   A problem occurred configuring root project 'android'.
   > Could not resolve all dependencies for configuration ':_debugCompile'.
      > Could not resolve com.android.support:support-v4:24.0.0.
        Required by:
            :android:unspecified
         > No cached version of com.android.support:support-v4:24.0.0 available for offline mode.
      > Could not resolve com.android.support:support-v4:24.0.0.
        Required by:
            :android:unspecified > android:CordovaLib:unspecified > android:JustepGetContent:unspecified > com.android.support:appcompat-v7:22.2.0
         > No cached version of com.android.support:support-v4:24.0.0 available for offline mode.
   
   * Try:
   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
   ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
   You may not have the required environment or OS to build this project
   
   D:\WeX5_V3.5pre\model\Native\city\build\src\platforms\android\cordova\node_modules\q\q.js:126
                       throw e;
                       ^
   Error code 1 for command: cmd with args: /s /c "D:\WeX5_V3.5pre\model\Native\city\build\src\platforms\android\gradlew cdvBuildRelease -b D:\WeX5_V3.5pre\model\Native\city\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline"
   Error: cmd: Command failed with exit code 1
****ERROR****: 子任务 "exec" 执行失败。
****ERROR****: 任务 "buildAndroid" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: exec returned: 1
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35942
发表于 2016-7-14 11:12:28 | 显示全部楼层
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

3

主题

14

帖子

30

积分

新手上路

Rank: 1

积分
30
QQ
 楼主| 发表于 2016-7-14 11:37:47 | 显示全部楼层
jishuang 发表于 2016-7-14 11:12
参考http://doc.wex5.com/wex5-app-question-list-0004/

依然报同样的错误。。。
开始......
   
保存配置信息:
   
清除编译环境:
   
复制模版工程:
   
复制工程:
   
复制插件:
   
复制WWW资源:
   
更新工程信息:
   
增加插件:
   使用到的插件: [cn.jpush.phonegap.JPushPlugin, cordova-plugin-whitelist, cordova-plugin-splashscreen, cordova-plugin-app-preferences, com.justep.cordova.plugin.app.utils]
   开始安装插件......
   开始准备插件参数......
   插件 "cn.jpush.phonegap.JPushPlugin" 参数如下:
        jpush应用标识(AppKey)(jpush_appkey):4418d03454a408727bb54696
   插件 "cordova-plugin-splashscreen" 参数如下:
   插件 "cordova-plugin-app-preferences" 参数如下:
   插件 "cordova-plugin-file" 参数如下:
   插件 "cordova-plugin-file-transfer" 参数如下:
   插件 "cordova-plugin-network-information" 参数如下:
   插件 "cordova-plugin-zip" 参数如下:
   插件 "cordova-plugin-inappbrowser" 参数如下:
   插件 "cordova-plugin-x-toast" 参数如下:
   插件 "com.justep.cordova.plugin.app.utils" 参数如下:
   插件参数准备完成
   Installing "jpush-phonegap-plugin" for android
   Installing "jpush-phonegap-plugin" for ios
   Installing "cordova-plugin-splashscreen" for android
   Installing "cordova-plugin-splashscreen" for ios
   Installing "cordova-plugin-app-preferences" for android
   Installing "cordova-plugin-app-preferences" for ios
   Installing "cordova-plugin-file" for android
   Installing "cordova-plugin-file" for ios
   Installing "cordova-plugin-file-transfer" for android
   Dependent plugin "cordova-plugin-file" already installed on android.
   Installing "cordova-plugin-file-transfer" for ios
   Dependent plugin "cordova-plugin-file" already installed on ios.
   Installing "cordova-plugin-network-information" for android
   Installing "cordova-plugin-network-information" for ios
   Installing "cordova-plugin-zip" for android
   Dependent plugin "cordova-plugin-file" already installed on android.
   Installing "cordova-plugin-zip" for ios
   Dependent plugin "cordova-plugin-file" already installed on ios.
   Installing "cordova-plugin-inappbrowser" for android
   Installing "cordova-plugin-inappbrowser" for ios
   Installing "cordova-plugin-x-toast" for android
   Installing "cordova-plugin-x-toast" for ios
   Installing "com.justep.cordova.plugin.app.utils" for android
   Dependent plugin "cordova-plugin-file" already installed on android.
   Dependent plugin "cordova-plugin-file-transfer" already installed on android.
   Dependent plugin "cordova-plugin-network-information" already installed on android.
   Dependent plugin "cordova-plugin-zip" already installed on android.
   Dependent plugin "cordova-plugin-inappbrowser" already installed on android.
   Dependent plugin "cordova-plugin-x-toast" already installed on android.
   Installing "com.justep.cordova.plugin.app.utils" for ios
   Dependent plugin "cordova-plugin-file" already installed on ios.
   Dependent plugin "cordova-plugin-file-transfer" already installed on ios.
   Dependent plugin "cordova-plugin-network-information" already installed on ios.
   Dependent plugin "cordova-plugin-zip" already installed on ios.
   Dependent plugin "cordova-plugin-inappbrowser" already installed on ios.
   Dependent plugin "cordova-plugin-x-toast" already installed on ios.
   插件安装完成
   
创建源代码工程:
   
android应用环境准备:
   
ios应用环境准备:
   
生成android应用包:
   Running command: cmd "/s /c "D:\tony\wex5\WeX5_V3.5pre\model\Native\citybaike\build\src\platforms\android\cordova\build.bat --release""
   ANDROID_HOME=D:\tony\wex5\WeX5_V3.5pre\tools\adt-sdk
   JAVA_HOME=D:\tony\wex5\WeX5_V3.5pre\java\jre1.8
   Running: D:\tony\wex5\WeX5_V3.5pre\model\Native\citybaike\build\src\platforms\android\gradlew cdvBuildRelease -b D:\tony\wex5\WeX5_V3.5pre\model\Native\citybaike\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true
   Incremental java compilation is an incubating feature.
   
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   A problem occurred configuring root project 'android'.
   > Could not resolve all dependencies for configuration ':_debugCompile'.
      > Could not find com.android.support:support-v4:24.0.0.
        Searched in the following locations:
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/maven/repo/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/maven/repo/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar
            https://repo1.maven.org/maven2/c ... pport-v4-24.0.0.pom
            https://repo1.maven.org/maven2/c ... pport-v4-24.0.0.jar
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/adt-sdk/extras/android/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/adt-sdk/extras/android/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar
        Required by:
            :android:unspecified
      > Could not find com.android.support:support-v4:24.0.0.
        Searched in the following locations:
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/maven/repo/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/maven/repo/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar
            https://repo1.maven.org/maven2/c ... pport-v4-24.0.0.pom
            https://repo1.maven.org/maven2/c ... pport-v4-24.0.0.jar
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/adt-sdk/extras/android/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
            file:/D:/tony/wex5/WeX5_V3.5pre/tools/adt-sdk/extras/android/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar
        Required by:
            :android:unspecified > android:CordovaLib:unspecified > android:JustepGetContent:unspecified > com.android.support:appcompat-v7:22.2.0
   
   * Try:
   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
   
   BUILD FAILED
   
   Total time: 4.961 secs
   
   D:\tony\wex5\WeX5_V3.5pre\model\Native\citybaike\build\src\platforms\android\cordova\node_modules\q\q.js:126
                       throw e;
                       ^
   Error code 1 for command: cmd with args: /s /c "D:\tony\wex5\WeX5_V3.5pre\model\Native\citybaike\build\src\platforms\android\gradlew cdvBuildRelease -b D:\tony\wex5\WeX5_V3.5pre\model\Native\citybaike\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true"
   ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
   You may not have the required environment or OS to build this project
   Error: cmd: Command failed with exit code 1
****ERROR****: 子任务 "exec" 执行失败。
****ERROR****: 任务 "buildAndroid" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: exec returned: 1
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-17 08:21 , Processed in 0.061120 second(s), 24 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表