EddyVerbruggen / cordova-plugin-googleplus

:heavy_plus_sign: Cordova plugin to login with Google Sign-In on iOS and Android
567 stars 629 forks source link

Plugin crashes build for android #430

Open AmitMY opened 7 years ago

AmitMY commented 7 years ago

I am using the cordova-plugin-googleplus for sign in with Google, and when trying to build I get:

    Error: cmd: Command failed with exit code 1 Error output:
    D:\..\project\platforms\android\src\nl\xservices\plugins\GooglePlus.java:151: error: cannot access AbstractSafeParcelable
                .addApi(Auth.GOOGLE_SIGN_IN_API, gso.build());
                ^
      class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    1 error

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':compileDebugJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.

I looked everywhere, and no solution worked for me.

Plugin version: 5.1.1

Cordova version: 7.0.1

I am already using compile "com.google.firebase:firebase-messaging:10.0.1" so the other issue thread is not a duplicate

christophmegusta commented 6 years ago

we too. any solution for this?

acyio commented 6 years ago

Any solution?

deepakdhull012 commented 6 years ago

Just change the play services version to 9.8.0 in project.properties file..for me it worked.

RoyeA commented 6 years ago

Had the same issue, until solved with the following:

  1. check the FCM_VERSION value in the plugins/phonegap-plugin-push/plugin.xml
  2. search for all plugin that uses play-services $grep play-services plugins/*/plugin.xml
  3. Update all files in step two to point the version value in step 1
  4. delete the platform directory to use the new changes $rm -fr platforms/
  5. compile and build.
itsSoufianeDev commented 6 years ago

Thank you @RoyeA The problem was that phonegap-plugin-push installs the latest version of com.google.firebase:firebase-messaging that conflicts with the other com.google libraries I use. The problem was resolved by changing the version to 11.0.4 and by cleaning the project (cordova clean android) and building it