DrMoriarty / godot-facebook

Facebook module for Godot Game Engine (android and iOS)
MIT License
81 stars 23 forks source link

android module build failure and fix suggestion #1

Closed ssemakin closed 3 years ago

ssemakin commented 5 years ago

hey, thanks for the trouble of picking this up and making it work!

When building Android module, I'm getting the following error while running gradle part:

Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:

I've managed to fix the build by adding this code to build.gradle though not familiar very well myself with the Android build process and gradle so am not sure if it's a valid fix but it works for me (found somewhere on the forums):

// this is fix to build GodotFacebook module for Android template
configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == "com.android.support") {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion "27.+"
            }
        }
    }
}

Building on Godot 3.1.1-stable branch, Java 1.8.0_60.

vadim-ilyn commented 4 years ago

Remove the line:

implementation "com.android.support:support-core-utils:28.0.0"

from the file platform/android/build.gradle.template before compiling to avoid conflicts between the support libs.

DrMoriarty commented 3 years ago

Plugin updated and using now new plugin management system.