android - Cordova 添加 google play 服务

标签 android cordova intellij-idea google-play-services onesignal

我刚刚将 OneSignal 添加到我的 Cordova 项目中。这似乎使用了 Google Play 服务,即(我收到一条消息“未找到有效的 Google Play 服务 APK”)。我想知道添加它的最佳方法。

  • 我的手机上安装了 Google Play 服务 v8.4.89。
  • 我通过 SDK 管理器安装了 Google Play 服务:

enter image description here

这会创建一个 google_play_services 文件夹(里面没有很多内容):

enter image description here

更新 根据 this Google 已将 Google Play 服务分解为多个库 (.aar),位于:

android-sdk\extras\google\m2repository\com\google\android\gms

enter image description here

  • build.gradle 依赖项:

enter image description here

我有点不确定下一步该做什么。我以为我可以使用 this .

我可能会补充说我正在使用 IntelliJ 并尝试按照 this 手动导入 JAR .

谢谢,

最佳答案

OneSignal 错误“未找到有效的 Google Play 服务 APK”表示设备中缺少“Google Play 服务”应用程序,或者很可能只是过时了。它应该检查设置>应用程序下的版本。在您打开设备上的 Google Play 商店并登录后,它应该会在后台自动更新。有关详细信息,请参阅以下链接。 https://documentation.onesignal.com/docs/all-users-are-shown-as-not-subscribed

关于android - Cordova 添加 google play 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38247171/

相关文章:

javascript - 如何将后台作业转换为函数之类的东西?

android - phonegap 播放 http ://or file://based mp3s does not work on Android

scala - 有没有办法在使用 IntelliJ + Bazel + Scala 时浏览库源?

java - 关闭自定义对话框

java - 在 android 中实现 Parcelable 时出错

java - 单击 Android 中的元素不会显示正确的值

ios - Cordova 3.3 使用 Media API 暂停和恢复录制

javascript - 请求问题 : Uncaught SyntaxError: Unexpected token/

intellij-idea - Intellij IDEA 在整个项目中提取常量

intellij-idea - Lombok @RequiredArgsConstructor(onConstructor_ = {@MyAnnotation}) IntelliJ IDEA 编译错误