braze-inc / braze-flutter-sdk

Public repo for the Braze Flutter SDK
Other
15 stars 29 forks source link

v7.0.0 isn't compatible with Flutter Android version #60

Closed rayliverified closed 5 months ago

rayliverified commented 6 months ago

Flutter currently supports SDK target 33, not 34. The latest Braze plugin requires targetSDK version 34.

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

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:mergeExtDexQaDebug'.

    Could not resolve all files for configuration ':app:qaDebugRuntimeClasspath'. Failed to transform kotlin-stdlib-1.9.10.jar (org.jetbrains.kotlin:kotlin-stdlib:1.9.10) 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}. Execution failed for DexingWithClasspathTransform: C:\Users\searc.gradle\caches\transforms-3\af5f39658d01b01dc753e42a71ae4269\transformed\jetified-kotlin-stdlib-1.9.10.jar. Error while dexing.

rayliverified commented 6 months ago

Here are the compatible gradle versions.

build.gradle snap_screen_20231027112432

gradle-wrapper.properties snap_screen_20231027112459

Please keep in mind that the latest versions of of gradle are not compatible with Flutter until Flutter officially supports them. Always use the version of gradle that Flutter officially supports.

hokstuff commented 6 months ago

Hi @rayliverified,

Can you link to the Flutter documentation that describes that Flutter does not support Android API 34? According to the official Flutter supported deployment platforms article and the What’s new in Flutter 3.13 blog post, Android API 34 is supported by the most recent minor version of Flutter released in August. Would you be able to update to that version and see if you are still experiencing errors? We can update any relevant documentation on our end to reflect these changes.

Let me know if you have any concerns or comments. Thank you!

rayliverified commented 6 months ago

Flutter supports SDK v34 but not as the targetSDK version.

flutter.compileSdkVersion = 33

hokstuff commented 6 months ago

Thanks for raising this! We've filed a ticket internally to make this change and will keep this thread updated when we have released a change.

rayliverified commented 6 months ago

Thank you! This is an area where Flutter can specify the constraints more clearly.

The way I keep up to date on what versions Flutter support is running flutter create ., creating a new project, and seeing what the generated files use.

hokstuff commented 5 months ago

Hi @rayliverified,

We have released Flutter SDK 8.0.0 which includes a change for this issue.

Thanks!