Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

record: 5.2.0 build fail,Execution failed for task ':app:mergeLibDexDebug' #429

Closed
sumaro opened this issue Nov 4, 2024 · 6 comments
Closed

Comments

@sumaro
Copy link

sumaro commented Nov 4, 2024

ERROR:\example\build\record_android\intermediates\runtime_library_classes_dir\debug\com\llfbandit\record\record\format\Format.class: D8: com.android.tools.r8.internal.Hc: Sealed classes are not supported as program classes

Execution failed for task ':app:mergeLibDexDebug'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform debug (project :record_android) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, com.android.build.api.attributes.AgpVersionAttr=7.3.0, com.android.build.api.attributes.BuildTypeAttr=debug, com.android.build.gradle.internal.attributes.VariantAttr=debug, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.jvm.environment=android, org.gradle.libraryelements=classes, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
> Execution failed for DexingNoClasspathTransform: example\build\record_android\intermediates\runtime_library_classes_dir\debug.
> Error while dexing.

@sumaro sumaro changed the title build fail,Execution failed for task ':app:mergeLibDexDebug' record: 5.2.0 build fail,Execution failed for task ':app:mergeLibDexDebug' Nov 4, 2024
@sumaro
Copy link
Author

sumaro commented Nov 4, 2024

record_platform_interface: 1.2.0 may be causing the problem
record_platform_interface: 1.1.0 is ok

@mevljas
Copy link

mevljas commented Nov 4, 2024

I have a similar problem

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeLibDexDevelopmentDebug'.
> Could not resolve all files for configuration ':app:developmentDebugRuntimeClasspath'.
   > Failed to transform classes.jar (project :record_android) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, com.android.build.api.attributes.AgpVersionAttr=7.3.1, com.android.build.api.attributes.BuildTypeAttr=debug, com.android.build.gradle.internal.attributes.VariantAttr=debug, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.jvm.environment=android, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
      > Execution failed for DexingWithClasspathTransform: /Users/mevljas/Projects/Flokkie/build/record_android/intermediates/runtime_library_classes_jar/debug/classes.jar.
         > Error while dexing.

@mevljas
Copy link

mevljas commented Nov 4, 2024

dependency_overrides:
  record_android: 1.2.6

Solved my issue.

@llfbandit
Copy link
Owner

Upgrade your setup.
Here are the latest versions for AGP v7

Android Gradle Plugin 7.4.2
https://github.com/llfbandit/record/blob/master/record_android/README.md

Gradle 7.6.4
In android/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip

Updating Android studio is also a good practice.

@sumaro sumaro closed this as completed Nov 6, 2024
@Nikunj-Flutter
Copy link

Your project's Gradle version is incompatible with the Java version that Flutter is using for Gradle. │ │ │ │ If you recently upgraded Android Studio, consult the migration guide at https://flutter.dev/to/to/java-gradle-incompatibility. │ │ │ │ Otherwise, to fix this issue, first, check the Java version used by Flutter by runningflutter doctor --verbose. │ │ │ │ Then, update the Gradle version specified in /Users/nikunj/Desktop/Work/help_app/android/gradle/wrapper/gradle-wrapper.properties to be compatible with │ │ that Java version. See the link below for more information on compatible Java/Gradle versions: │ │ https://docs.gradle.org/current/userguide/compatibility.html#java

I tried the solution but the java version is incapable which java version should i use with record 5.2.0

@hxmeie
Copy link

hxmeie commented Nov 18, 2024

Your project's Gradle version is incompatible with the Java version that Flutter is using for Gradle. │ │ │ │ If you recently upgraded Android Studio, consult the migration guide at https://flutter.dev/to/to/java-gradle-incompatibility. │ │ │ │ Otherwise, to fix this issue, first, check the Java version used by Flutter by runningflutter doctor --verbose. │ │ │ │ Then, update the Gradle version specified in /Users/nikunj/Desktop/Work/help_app/android/gradle/wrapper/gradle-wrapper.properties to be compatible with │ │ that Java version. See the link below for more information on compatible Java/Gradle versions: │ │ https://docs.gradle.org/current/userguide/compatibility.html#java

I tried the solution but the java version is incapable which java version should i use with record 5.2.0

flutter config --jdk-dir path-to-java-sdk-17-home-directory

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

No branches or pull requests

5 participants