YoYoGames / GMEXT-AdMob

Repository for GameMaker's AdMob Extension
Other
9 stars 3 forks source link

Game can't compile when adding UnityAds #51

Closed gmemicarra closed 4 months ago

gmemicarra commented 4 months ago

Hello, when i try to compile using the UnityAds mediation extension, it throws this error. It builds fine using only the AdMob extension. Updated all my Build Tools, IDE, Runtime, and still no luck:

Build Tools: 34.0.0 IDE: 2024.6.1.160 Runtime: 2024.6.1.208 NDK: 26.3.11579264

ERROR:D8: com.android.tools.r8.kotlin.H ERROR:D8: com.android.tools.r8.kotlin.H ERROR:D8: com.android.tools.r8.kotlin.H

Failed to transform koin-core-jvm-3.5.3.jar (io.insert-koin:koin-core-jvm:3.5.3) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}. Execution failed for DexingWithClasspathTransform: C:\Users\gmemi.gradle\caches\transforms-3\e90e5800e6b0c1c722f6d026fad49e21\transformed\jetified-koin-core-jvm-3.5.3.jar. Error while dexing.

Failed to transform koin-annotations-jvm-1.3.0.jar (io.insert-koin:koin-annotations-jvm:1.3.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}. Execution failed for DexingWithClasspathTransform: C:\Users\gmemi.gradle\caches\transforms-3\7c970448b084043bed983778f5afe19e\transformed\jetified-koin-annotations-jvm-1.3.0.jar. Error while dexing.

Failed to transform kotlin-stdlib-1.9.21.jar (org.jetbrains.kotlin:kotlin-stdlib:1.9.21) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.jvm.environment=standard-jvm, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}. Execution failed for DexingWithClasspathTransform: C:\Users\gmemi.gradle\caches\transforms-3\d5265f5f1d379c494f3e2969408ed4fb\transformed\jetified-kotlin-stdlib-1.9.21.jar. Error while dexing.

I don't know what else to do, any help appreciated!

jzavala-YYG commented 4 months ago

Hello @gmemicarra,

Try this configuration:

image

Worked for me

Regards

gmemicarra commented 4 months ago

Hello @gmemicarra,

Try this configuration: image Worked for me

Regards

Thank you, it worked! Sadly this way i'm losing a few users, but it works.

I read that someone used another way, he wrote this code, do you know where could i try inputting this code to see if it works?: Is it in the build.gradle or where could i try? Thanks debug { // fix Failed to transform firebase-auth-22.3.1.aar minifyEnabled true signingConfig signingConfigs.debug } https://stackoverflow.com/questions/77416448/failed-to-transform-firebase-auth-22-2-0-aar

jzavala-YYG commented 4 months ago

@gmemicarra

Ok, exists a way, but I can't implement it directly on the extensions, so I will write it here, eventually all the users should use min: 24.

1) Open C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2024.6.1.208\android\runner\ProjectFiles\build.gradle

2) Insert this code in the line 49 (after buildTypes finalizes )

buildTypes {
        debug {
            signingConfig signingConfigs.release
            minifyEnabled ${YYAndroidProGuardMinifyEnabled}
            shrinkResources ${YYAndroidProGuardShrinkResources}
            getIsDefault().set(true)
            ndk {
                debugSymbolLevel 'FULL'
            }
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
            consumerProguardFiles 'proguard-rules.pro'
        }
}

3) Check minifyEnabled

image

Let me know if work for you.

gmemicarra commented 4 months ago

@jzavala-YYG Awesome! It works now with older SDK! Thank you very much for your help!

The build.gradle code is like this now: image