Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Fix for 'com.google.android.gms.license' bug #474

Merged
merged 1 commit into from
Mar 25, 2018
Merged

Fix for 'com.google.android.gms.license' bug #474

merged 1 commit into from
Mar 25, 2018

Conversation

rostyk-kanafotskyy
Copy link
Contributor

Related issue : #473

Repository owner deleted a comment from Emperorlou Mar 25, 2018
@EddyVerbruggen EddyVerbruggen merged commit fe84633 into EddyVerbruggen:master Mar 25, 2018
@Emperorlou
Copy link

@EddyVerbruggen thanks! When will this be available on npm so phonegap build works again?

@Emperorlou
Copy link

Nevermind, I just tried it and it works! Thanks!

@petemcwilliams
Copy link

petemcwilliams commented Apr 2, 2018

I'm getting a build error, suspect this merge is the cause, builds ok on v5.2.1

:CordovaLib:mergeDebugAssets
:mergeDebugAssets

:transformClassesWithDexBuilderForDebug

:transformDexArchiveWithExternalLibsDexMergerForDebug

FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

  • 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 15s
35 actionable tasks: 35 executed
(node:60252) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /Users/petermcwilliams/Documents/appframework//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.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

@EddyVerbruggen
Copy link
Owner

@petemcwilliams I don't see a relevant error in this log. Can you update your Android repo's locally and try again?

@petemcwilliams
Copy link

petemcwilliams commented Apr 2, 2018

Sorry what are you referring to as updating my Android repo locally...
building with
ionic cordova build android --prod
Works if i downgrade to version 5.2.1 of your plugin, fails with dex merge issues whatever they are with version 5.2.2 and 5.2.3, only reason I am working on this bank holiday in the UK ;)

Suspect the issue is the change of version of the google version from + to a specific version and conflicts with other cordova plugins

@EddyVerbruggen
Copy link
Owner

Open Android Studio, and update 'Android Support Repository' and 'Android Support Library' through the Android SDK manager. The plugin now pins to version 11.8.0.

I'm not surprised this change opens up a new can of worms.

@petemcwilliams
Copy link

Ok thanks, will give that a go

@petemcwilliams
Copy link

Seems to be an issue with a conflict with other modules using google v12.0.1, for example firebase...

My workaround is based on arnesson/cordova-plugin-firebase#610 to place the build-extras.gradle in correct place and I liked this method of setting a version against a module group rather than individually https://stackoverflow.com/a/39292202

configurations.all {
    resolutionStrategy {
        eachDependency { DependencyResolveDetails details ->
            if (details.requested.group == 'com.google.android.gms' || details.requested.group == 'com.google.firebase') {
                details.useVersion "12.0.1"
            }
        }
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants