Build APK Error


#1
  • I can try to add puch Notification in ionic ,
    After run – ionic plugin add cordova-plugin-fcm
    I got error while build android APK file.

ANDROID_HOME=D:\install\Android\SDK

JAVA_HOME=D:\install\jdk

Subproject Path: CordovaLib

google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be used.

please apply google-services plugin at the bottom of the build file.

Incremental java compilation is an incubating feature.

:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest

:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE

:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE

:CordovaLib:compileLint UP-TO-DATE

:CordovaLib:copyDebugLint
UP-TO-DATE

:CordovaLib:mergeDebugShaders

UP-TO-DATE

:CordovaLib:compileDebugShaders

UP-TO-DATE

:CordovaLib:generateDebugAssets UP-TO-DATE

:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript
UP-TO-DATE

:CordovaLib:compileDebugRenderscript
UP-TO-DATE

:CordovaLib:generateDebugResValues
UP-TO-DATE

:CordovaLib:generateDebugResources
UP-TO-DATE

:CordovaLib:packageDebugResources

UP-TO-DATE

:CordovaLib:processDebugManifest

UP-TO-DATE

:CordovaLib:generateDebugBuildConfig

UP-TO-DATE

:CordovaLib:processDebugResources
UP-TO-DATE

:CordovaLib:generateDebugSources

UP-TO-DATE

:CordovaLib:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE

:CordovaLib:compileDebugJavaWithJavac

UP-TO-DATE
:CordovaLib:processDebugJavaRes
UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForDebug

UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
UP-TO-DATE

:CordovaLib:mergeDebugJniLibFolders
UP-TO-DATE

:CordovaLib:transformNative_libsWithMergeJniLibsForDebug

UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug

UP-TO-DATE
:CordovaLib:bundleDebug

UP-TO-DATE

:prepareAndroidCordovaLibUnspecifiedDebugLibrary

UP-TO-DATE

:preReleaseBuild UP-TO-DATE

:CordovaLib:preReleaseBuild

UP-TO-DATE

:CordovaLib:checkReleaseManifest

:CordovaLib:prepareReleaseDependencies

:CordovaLib:compileReleaseAidl

UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint
UP-TO-DATE

:CordovaLib:mergeReleaseShaders

UP-TO-DATE

:CordovaLib:compileReleaseShaders
UP-TO-DATE

:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets
UP-TO-DATE

:CordovaLib:mergeReleaseProguardFiles

UP-TO-DATE
:CordovaLib:packageReleaseRenderscript
UP-TO-DATE

:CordovaLib:compileReleaseRenderscript

UP-TO-DATE
:CordovaLib:generateReleaseResValues

UP-TO-DATE

:CordovaLib:generateReleaseResources UP-TO-DATE

:CordovaLib:packageReleaseResources
UP-TO-DATE

:CordovaLib:processReleaseManifest
UP-TO-DATE

:CordovaLib:generateReleaseBuildConfig
UP-TO-DATE

:CordovaLib:processReleaseResources

UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:incrementalReleaseJavaCompilationSafeguard

UP-TO-DATE
:CordovaLib:compileReleaseJavaWithJavac
UP-TO-DATE

:CordovaLib:processReleaseJavaRes UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForRelease
UP-TO-DATE

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
UP-TO-DATE

:CordovaLib:mergeReleaseJniLibFolders
UP-TO-DATE

:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
UP-TO-DATE

:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
UP-TO-DATE

:CordovaLib:bundleRelease

UP-TO-DATE

:prepareComAndroidSupportSupportV42400Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesBase1024Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesBasement1024Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesLocation1024Library

UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks1024Library
UP-TO-DATE

:prepareComGoogleFirebaseFirebaseAnalytics1024Library

UP-TO-DATE

:prepareComGoogleFirebaseFirebaseAnalyticsImpl1024Library
UP-TO-DATE

:prepareComGoogleFirebaseFirebaseCommon1024Library
UP-TO-DATE

:prepareComGoogleFirebaseFirebaseConfig1024Library
UP-TO-DATE

:prepareComGoogleFirebaseFirebaseCore1024Library
UP-TO-DATE

:prepareComGoogleFirebaseFirebaseCrash1024Library

UP-TO-DATE
:prepareComGoogleFirebaseFirebaseIid1024Library
UP-TO-DATE

:prepareComGoogleFirebaseFirebaseMessaging1024Library

UP-TO-DATE

:prepareMeLeolinShortcutBadger114Library

UP-TO-DATE

:prepareDebugDependencies

:compileDebugAidl
UP-TO-DATE

:compileDebugRenderscript
UP-TO-DATE

:generateDebugBuildConfig
UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:processDebugGoogleServices
Found com.google.android.gms:play-services-location:+, but version 9.0.0 is needed for the google-services plugin.
:processDebugGoogleServices FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processDebugGoogleServices’.

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

BUILD FAILED

Total time: 10.408 secs

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

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processDebugGoogleServices’.

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

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

#2

Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.


#3

You’re probably facing the same problem as I am. I already used the FCM plugin, no problems there. When I added the Google Maps plugin, I however got the same error as you. Especially one of the first lines is odd:
google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be used.

please apply google-services plugin at the bottom of the build file.

Because I can’t seem to install or use a different version of the google services plugin than 9.0.0. That seems to be the problem.

However, if this is the first Google plugin you’re installing, the problem might be the update from a few weeks ago. Can you post your FCMPlugin.gradle file?