EddyVerbruggen / cordova-plugin-googleplus

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

Can't Take Android Build #522

Open arunkumarbrt opened 6 years ago

arunkumarbrt commented 6 years ago

Ionic Info:

ionic (Ionic CLI) : 4.1.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.11

Cordova:

cordova (Cordova CLI) : 7.0.0 Cordova Platforms : android 7.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.0.3, (and 6 other plugins)

System:

ios-deploy : 2.0.0 NodeJS : v10.8.0 (/usr/local/bin/node) npm : 6.3.0 OS : macOS High Sierra Xcode : Xcode 9.4.1 Build version 9F2000

Environment:

Error:

:app:compileDebugAidl :CordovaLib:packageDebugRenderscript NO-SOURCE :app:compileDebugRenderscript UP-TO-DATE :app:checkDebugManifest UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:prepareLintJar UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources :app:createDebugCompatibleScreenManifests UP-TO-DATE :app:processDebugManifest :app:splitsDiscoveryTaskDebug UP-TO-DATE :app:processDebugResources :app:generateDebugSources :app:javaPreCompileDebug Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :app:compileDebugJavaWithJavac :app:compileDebugNdk NO-SOURCE :app:compileDebugSources :CordovaLib:mergeDebugShaders UP-TO-DATE :CordovaLib:compileDebugShaders UP-TO-DATE :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets UP-TO-DATE :app:mergeDebugShaders UP-TO-DATE :app:compileDebugShaders UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets :app:transformClassesWithStackFramesFixerForDebug :app:transformClassesWithDesugarForDebug :app:transformClassesWithDexBuilderForDebug :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED

FAILURE: Build failed with an exception.

BUILD FAILED in 10s 37 actionable tasks: 12 executed, 25 up-to-date Error: /Users/brt/Documents/Developement/ionic/Belafy/platforms/android/gradlew: Command failed with exit code 1 Error output: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

BUILD FAILED in 10s [ERROR] An error occurred while running subprocess cordova.

    cordova build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.
zwacky commented 6 years ago

had the same issue but caused through other plugins. @arunkumarbrt can you post your cordova plugin ls?

Larablock commented 6 years ago

Did you find a solution ? I got same problem with GooglePlus plugin

X2Style commented 6 years ago

@Larablock faced with this issue in version 5.3.1. Rolled back to 5.3.0 and all work like it should.

EddyVerbruggen commented 6 years ago

@X2Style There is really nothing in the changed diff that would explain why it would work with 5.3.0 and not work with 5.3.1. Strange..

X2Style commented 6 years ago

@Larablock @EddyVerbruggen all working with 5.3.1. In my case it was some issue with cordova-plugin-facebook4. Also I'm using phonegap-plugin-push and after npm i and platform add, I should modify all Google libraries versions in "project.properties", and then build. But if I modify them after first build it will be crashed.

zwacky commented 6 years ago

My issue was caused by some SDK version shenanigans.

adb logcat stacktrace ``` java.lang.NoClassDefFoundError: com.google.android.gms.auth.api.Auth at nl.xservices.plugins.GooglePlus.buildGoogleApiClient(GooglePlus.java:181) at nl.xservices.plugins.GooglePlus.execute(GooglePlus.java:88) at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:117) at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98) at org.apache.cordova.PluginManager.exec(PluginManager.java:132) at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57) at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41) at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) at org.chromium.base.SystemMessageHandler.handleMessage(SourceFile:9) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.os.HandlerThread.run(HandlerThread.java:65) ```


I got my build working after I manually unpinned the framework versions in cordova-plugin-googleplus from 11.8.0 to +.

Not very sexy solution as the changes won't persist if you remove the plugin, but some work-around.