llfbandit / record

Audio recorder from microphone to a given file path. No external dependencies, MediaRecorder is used for Android an AVAudioRecorder for iOS.
https://pub.dev/packages/record
243 stars 204 forks source link

App build failure after installing the 'record' Flutter package. #350

Closed macrogreg closed 5 months ago

macrogreg commented 5 months ago

Package version

5.1.1

Environment Windows 10, VS Code

Describe the bug

After installing the package, I am getting the following build break for my app:

ERROR:C:\00\Code\MyApp\src\build\record_android\intermediates\runtime_library_classes_jar\debug\classes.jar: D8: com.android.tools.r8.internal.Hc: Sealed classes are not supported as program classes

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeLibDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > 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.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=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: C:\00\Code\MyApp\src\build\record_android\intermediates\runtime_library_classes_jar\debug\classes.jar.
         > Error while dexing.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 14s

Expected behavior

Clean build

macrogreg commented 4 months ago

Hi @llfbandit, I see you closed this as "completed". Could you please elaborate? This is a genuine issue from my perspective. I am new to Flutter, so if there are some "obvious" additional data points I should have provided, I'd be happy to, just name what's missing. Of course, I can go debug this based on the error message, but this is the only build error caused by a package in quite a bit of packages I am using, so I hoped to help the maintainers by letting them know of it.

If this is currently not a priority, perhaps a "won't-fix" may be more fitting than "completed"? Anyway, if you could share a brief info about your thinking here, I would be very grateful. :)

llfbandit commented 4 months ago

This issue has been closed as completed in https://github.com/llfbandit/record/commit/3abfde10c0e8774690e84fb4296861c085d10eab.

You can go to https://github.com/llfbandit/record/blob/master/record_android/README.md already to update your setup without waiting the next incoming release.

macrogreg commented 4 months ago

Got it. Thank you for providing this context!