ionic3 jpush提示 plugin not install

ionic 3.19.0
cordova 7.1.0
android 7.1.1
jmessage-phonegap-plugin 4.1.0
jpush-phonegap-plugin 3.6.4

然后调用setAlias时提示 plugin not install

下面是package.json信息:

{
  "name": "TongChengMJ",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/browser-tab": "^4.20.0",
    "@ionic-native/camera": "^4.20.0",
    "@ionic-native/core": "~4.20.0",
    "@ionic-native/file": "^4.20.0",
    "@ionic-native/file-opener": "^4.20.0",
    "@ionic-native/file-transfer": "^4.20.0",
    "@ionic-native/in-app-browser": "^4.20.0",
    "@ionic-native/photo-library": "^4.20.0",
    "@ionic-native/splash-screen": "~4.20.0",
    "@ionic-native/sqlite": "^4.20.0",
    "@ionic-native/status-bar": "~4.20.0",
    "@ionic-native/toast": "^4.20.0",
    "@ionic/storage": "2.2.0",
    "@jiguang-ionic/jmessage": "^2.0.0",
    "@jiguang-ionic/jpush": "^1.0.2",
    "cordova-android": "7.1.1",
    "cordova-ios": "4.5.5",
    "cordova-plugin-add-swift-support": "^1.6.0",
    "cordova-plugin-alipay-v2": "^2.0.0",
    "cordova-plugin-browsertab": "^0.2.0",
    "cordova-plugin-camera": "^4.1.0",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-file-opener2": "^2.2.1",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-inappbrowser": "^3.1.0",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^4.1.1",
    "cordova-plugin-jcore": "^1.2.8",
    "cordova-plugin-photo-library": "^2.2.1",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-plugin-x-toast": "^2.7.2",
    "cordova-sqlite-storage": "^3.3.0",
    "ionic-angular": "3.9.5",
    "ionic2-city-picker": "^0.0.11",
    "ionicons": "3.0.0",
    "jmessage-phonegap-plugin": "^4.1.1",
    "jpush-phonegap-plugin": "^3.6.4",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.29"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.1",
    "typescript": "^2.8.1"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-file": {},
      "cordova-plugin-file-opener2": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-camera": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "cordova-sqlite-storage": {},
      "cordova-plugin-photo-library": {
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "To choose photos"
      },
      "cordova-plugin-x-toast": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-browsertab": {},
      "jpush-phonegap-plugin": {
        "APP_KEY": "819e9a9725bdfddbb79919a4",
        "CHANNEL": "developer-default"
      },
      "cordova-plugin-alipay-v2": {
        "APP_ID": "2019051264523217"
      },
      "jmessage-phonegap-plugin": {
        "APP_KEY": "819e9a9725bdfddbb79919a4",
        "CHANNEL": "developer-default"
      }
    },
    "platforms": [
      "android"
    ]
  }
}

请升级到 jmessage-phonegap-plugin:4.1.4 版本及以上

jmessage-phonegap-plugin 4.1.4 “JMessage”

jpush-phonegap-plugin 3.6.4 “JPush”

还是提示 plugin not install

Element service#cn.jpush.android.service.PushService at AndroidManifest.xml:77:9-84:19 duplicated with element declared at AndroidManifest.xml:34:9-41:19

还有之前运行正常的项目 今天重新打包 就提示上面的错误。下面是配置清单:
android 7.1.0
cordova 7.1.0
ionic 3.19.0
jmessage-phonegap-plugin 4.1.4 “JMessage”
jpush-phonegap-plugin 3.7.2 “JPush”

这个提示是说有元素重复了,你检查下提示对应的元素,在同时集成 JPush和 JMessage 的时候同样的内容只需要声明一次

jmessage-phonegap-plugin 4.1.4 “JMessage”

jpush-phonegap-plugin 3.6.4 “JPush”

还是提示 plugin not install

JPush 和 JCore 的版本也升级一下到最新的,特别是JCore的版本要匹配上最新的

如果还是不行,如下检查:

你是否是在platform ready 回调中调用 jpush 相关方法。

platform.ready().then

调用 ionic cordova plugin list 看看输出上面内容。

  • 检查 appModule 中 providers 有没有添加 jpush、jmessage 插件。
  • 检查 constructor() 中有没有添加 jpush、jmessage。

我安装了jmessage 还需要安装 jpush包吗?现在总是提示Element service#cn.jpush.android.service.PushService at AndroidManifest.xml:77:9-84:19 duplicated

现在我只安装了jmessage 插件4.1.4,Android7.1.0打包的时候已经没有任何错误了 但是我在尝试jmessage.login操作时,会提示我code:871504 description:push register not finished 错误

极光推送我们公司用了好几个项目 都没有问题 这次新建的项目问题特别多 环境明明一样的 版本号也是一样

能帮忙看下吗?到底是什么原因呢

你现在遇到的报错是什么

1、说明你现在报错的项目里面集成的极光插件的版本号,特别注意 JCore 的版本号要对应升级,你要用什么项目就加什么项目,如果说不用 JPush 的那就不要添加,你之前的描述中是有用到 JPush 的插件版本

2、登陆操作提示还没有注册成功的错误需要你给出完整的日志信息,需要检查客户端的包名、Appkey 和极光官网的配置是否一样

如果一直提示这个说明你的配置有误。
因为这个配置涉及到很多方面,所以需要你自己来检查
先了解清楚如何正确添加so、jar包,整理下思绪,依次检查、尝试。集成文档:https://docs.jiguang.cn/jmessage/client/jmessage_android_guide/

抱歉再次麻烦您,我现在的配置是
cordova 7.1.0
ionic 3.19.0
安装的jmessage版本4.1.4
以下是package.json信息:
{
“name”: “TongChengMJ”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“start”: “ionic-app-scripts serve”,
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”
},
“dependencies”: {
@angular/animations”: “5.2.11”,
@angular/common”: “5.2.11”,
@angular/compiler”: “5.2.11”,
@angular/compiler-cli”: “5.2.11”,
@angular/core”: “5.2.11”,
@angular/forms”: “5.2.11”,
@angular/http”: “5.2.11”,
@angular/platform-browser”: “5.2.11”,
@angular/platform-browser-dynamic”: “5.2.11”,
@ionic-native/browser-tab”: “^4.20.0”,
@ionic-native/camera”: “^4.20.0”,
@ionic-native/core”: “~4.20.0”,
@ionic-native/file”: “^4.20.0”,
@ionic-native/file-opener”: “^4.20.0”,
@ionic-native/file-transfer”: “^4.20.0”,
@ionic-native/in-app-browser”: “^4.20.0”,
@ionic-native/photo-library”: “^4.20.0”,
@ionic-native/splash-screen”: “~4.20.0”,
@ionic-native/sqlite”: “^4.20.0”,
@ionic-native/status-bar”: “~4.20.0”,
@ionic-native/toast”: “^4.20.0”,
@ionic/storage”: “2.2.0”,
@jiguang-ionic/jmessage”: “^2.0.0”,
“cordova-android”: “7.1.1”,
“cordova-ios”: “4.5.5”,
“cordova-plugin-add-swift-support”: “^1.6.0”,
“cordova-plugin-alipay-v2”: “^2.0.0”,
“cordova-plugin-browsertab”: “^0.2.0”,
“cordova-plugin-camera”: “^4.1.0”,
“cordova-plugin-compat”: “^1.2.0”,
“cordova-plugin-device”: “^2.0.3”,
“cordova-plugin-file”: “^6.0.2”,
“cordova-plugin-file-opener2”: “^2.2.1”,
“cordova-plugin-file-transfer”: “^1.7.1”,
“cordova-plugin-inappbrowser”: “^3.1.0”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “^4.1.1”,
“cordova-plugin-jcore”: “^1.3.0”,
“cordova-plugin-photo-library”: “^2.2.1”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “^2.4.3”,
“cordova-plugin-whitelist”: “^1.3.4”,
“cordova-plugin-x-toast”: “^2.7.2”,
“cordova-sqlite-storage”: “^3.3.0”,
“ionic-angular”: “3.9.5”,
“ionic2-city-picker”: “^0.0.11”,
“ionicons”: “3.0.0”,
“jmessage-phonegap-plugin”: “^4.1.4”,
“rxjs”: “5.5.11”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.29”
},
“devDependencies”: {
@ionic/app-scripts”: “3.2.1”,
“typescript”: “^2.8.1”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-file”: {},
“cordova-plugin-file-opener2”: {
“ANDROID_SUPPORT_V4_VERSION”: “27.+”
},
“cordova-plugin-file-transfer”: {},
“cordova-plugin-camera”: {
“ANDROID_SUPPORT_V4_VERSION”: “27.+”
},
“cordova-sqlite-storage”: {},
“cordova-plugin-photo-library”: {
“PHOTO_LIBRARY_USAGE_DESCRIPTION”: “To choose photos”
},
“cordova-plugin-x-toast”: {},
“cordova-plugin-whitelist”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {
“APP_KEY”: “819e9a9725bdfddbb79919a4”
},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {
“ANDROID_SUPPORT_ANNOTATIONS_VERSION”: “27.+”
},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-inappbrowser”: {},
“cordova-plugin-browsertab”: {},
“cordova-plugin-alipay-v2”: {
“APP_ID”: “2019051264523217”
},
“jmessage-phonegap-plugin”: {
“APP_KEY”: “819e9a9725bdfddbb79919a4”,
“CHANNEL”: “developer-default”
}
},
“platforms”: [
“android”
]
}
}

目前的问题是:提示871504 push register not finished

你把完整的日志信息给一下,注册未完成是在 初始化之前调了别的API导致的,需要看下是不是延迟一段时间后会注册成功,或者就是注册失败了,失败会有具体的失败日志