IONIC APK生成问题

时间:2018-08-04 16:07:28

标签: android firebase-realtime-database ionic3 angular5 onesignal

运行ionic cordova build --release android时出现此错误 但是昨天它运行得非常好,即时消息没有更改任何有关配置的内容,我认为这是版本问题,但我找不到解决方法,请帮忙

这是控制台日志

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:releaseCompileClasspath'.
> Could not find any version that matches com.google.firebase:firebase-measurement-connector:[10.2.1,12.1.0[.
  Versions that do not match:
      17.0.0

      16.0.0
      15.0.0

  Required by:
      project :app > com.google.firebase:firebase-messaging:17.0.0


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or 
--debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED
 in 41s
11 actionable tasks: 11 executed
(node:15826) UnhandledPromiseRejectionWarning: Error: /home/chamikara/Projects/freelance/ionic/beachlines/notifications/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:releaseCompileClasspath'.
> Could not find any version that matches com.google.firebase:firebase-measurement-connector:[10.2.1,12.1.0[.
  Versions that do not match:
      17.0.0
      16.0.0
      15.0.0
  Required by:
      project :app > com.google.firebase:firebase-messaging:17.0.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 41s
    at ChildProcess.whenDone (/home/chamikara/Projects/freelance/ionic/beachlines/notifications/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:15826) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15826) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

1 个答案:

答案 0 :(得分:0)

与该答案有关:https://stackoverflow.com/a/51779975/279326我通过回到ionic@4.0.3 npm i -g ionic@4.0.3

进行了修复。