Closed cmbellman closed 5 months ago
Also may be related, I get this build error when trying to run it on my Samsung s22 ultra:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform tracking-3.10.0.aar (io.customer.android:tracking:3.10.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=25, org.gradle.category=library, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
> Execution failed for DexingNoClasspathTransform: /Users/aad01/.gradle/caches/transforms-3/f8604d2da13633dfdcc647ce2f094253/transformed/jetified-tracking-3.10.0-runtime.jar.
> Error while dexing.
Hey @cmbellman, thank you for reaching out, what gradle version are you using?
Hi @Shahroz16, my gradle version is Gradle 7.4.2
I'm on a mac m2 laptop, don't know if that matters though :)
I'm also getting the same error as @cmbellman. I'm using gradle 7.6.3 on Macbook Pro i9
* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform tracking-3.10.0.aar (io.customer.android:tracking:3.10.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=23, org.gradle.category=library, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
> Execution failed for DexingWithClasspathTransform: /Users/emanuel.lopez/.gradle/caches/transforms-3/febade0f6832fe187087078a47e39211/transformed/jetified-tracking-3.10.0-runtime.jar.
> Error while dexing.
Steps to reproduce:
flutter create customer_io_test
flutter pub add customer_io
android/app/build.gradle
:
compileSdk 34
minSdkVersion 23
targetSdkVersion 34
tried running the app
Thanks for more details folks, it looks similar to this issue could you try updating your minSdkVersion
to 24 ?
This one looks even more related https://github.com/flutter/flutter/issues/144600#issuecomment-2074820649
I'm having minSdkVersion=25
Did you try out the solutions suggested in this GitHub issue?
Because this isn't specific to the CIO flutter SDK, you will face the same issue if you add any other dependency of google etc. This is related to how multi dex is happening in your application.
So I would suggest updating the Flutter version, maybe along with solutions suggested in the link above.
Jumping into the discussion to see if I can help. Thanks for sharing the details. I just tested on new Flutter app using the commands shared above. I was able to run the app by simply updating minSdkVersion
and Android Gradle Plugin version in settings.gradle
file as follows:
id "com.android.application" version "7.4.1" apply false
Please make that you are checking the Android Gradle Plugin version in settings.gradle
and not the Gradle version in the gradle-wrapper.properties
.
Do let us know if you still face any issues or have more questions. Have a great day!
In settings.gradle I have
id "com.android.application" version "7.5.1" apply false
Also my compileSdkVersion is 34 becuase of some dependencies, but that shouldn't break anything right?
Thanks for confirming. Unfortunately, Android Gradle Plugin 7.5.1
was never released, which could cause your app to not compile already. Can you please ensure that you are using the correct AGP version and follow these steps:
settings.gradle
to use correct AGP version (7.4.1
)Flutter Clean
from Android StudioFlutter Pub Get
from Android StudioLet us know if you encounter any further issues.
That was it, downgrading to 7.4.1 fixed the issue! Thanks for the help!
it also worked for me! thank you very much guys!
thanks for confirming folks!
Sorry for the confusion, the 7.5.1 wasn't our real gradle plugin version, it was just a snapshot of desperate trial and error changes of versions to try to find a working combo. We were indeed on 7.3.1 and it seems like 7.4.1 was needed in order to get things to work!
And for anyone coming here having the same problem, plugin version 7.4.1 requires gradle-wrapper.properties
to specify distributionUrl for gradle version 7.5 (which may seem kinda confusing to some) :)
Sorry for the confusion, the 7.5.1 wasn't our real gradle plugin version, it was just a snapshot of desperate trial and error changes of versions to try to find a working combo. We were indeed on 7.3.1 and it seems like 7.4.1 was needed in order to get things to work!
And for anyone coming here having the same problem, plugin version 7.4.1 requires
gradle-wrapper.properties
to specify distributionUrl for gradle version 7.5 (which may seem kinda confusing to some) :)
Indeed this solution worked, I tried a lot of stuff and only this one worked, thanks!
if anyone still having issue similar to:
Execution failed for task :app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform tracking-3.10.0.aar (io.customer.android:tracking:3.10.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=25, org.gradle.category=library, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
> Execution failed for DexingNoClasspathTransform: /Users/aad01/.gradle/caches/transforms-3/f8604d2da13633dfdcc647ce2f094253/transformed/jetified-tracking-3.10.0-runtime.jar.
> Error while dexing.
If you do not want to update the Gradle version. There is a simple way to fix that issue.
in pubspec.yaml
just include 1.3.2 version of Customer IO which totally works with Gradle 7.5:
customer_io: 1.3.2
Hope that helps!
Thanks for your continued support everyone.
Version 1.5.1
of the Flutter SDK has been deployed and includes a fix for this error message.
Please, give this new release a try. If you continue to receive this error message after install, send us a message with updated reproduction steps and we'll continue to look into it.
Thank you so much!
I'm getting the above error when running the CustomerIO.initialize function, targeting iOS simulator (I don't need push)
My initialization code in main.dart:
Flutter doctor: [✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale en-SE) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] IntelliJ IDEA Ultimate Edition (version 2023.1) [✓] VS Code (version 1.88.1) [✓] Connected device (4 available)
[✓] Network resources