sbis04 / video_trimmer

Flutter video trimmer package
https://pub.dev/packages/video_trimmer
MIT License
427 stars 253 forks source link

Error when run in Android 6.x #201

Open JmyW opened 1 year ago

JmyW commented 1 year ago

Hi My app needs to cover older phone that miniSdk on 6.x. I know I need to add override in Manifest "<uses-sdk tools:overrideLibrary="com.arthenica.ffmpegkit.flutter"/>" and I did with my minisdk setting on 23. When I add video_trimmer in pubspec.yaml and add overrideLibrary in Manifest. The error is happend. I even not start any programming. The error appears conflict with other packages - shared_preferences and flutter_statusbarcolor_ns.

I/flutter (26796): Launch app at 2023-04-04 10:27:47.283911 E/flutter (26796): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method setstatusbarcolor on channel plugins.sameer.com/statusbar) E/flutter (26796): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:313:7) E/flutter (26796): E/flutter (26796): E/flutter (26796): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences_android)

The error just happen when I add these two lines. When I remove two lines, it return working normal. That is easy reproducible. [pubspec.yaml] video_trimmer: ^2.0.1 [AndroidManifest,xml] <uses-sdk tools:overrideLibrary="com.arthenica.ffmpegkit.flutter"/>

It could be same with issue #165 , but 165 was judged as Firebase issue. I believe it should be same situation like what I found. However, I know the minimum sdk should be 24 but general expectation should be at least allow to import even no function. I mean the overrideLibrary allow to include this package. Then my app should responsible to prevent it functions in program. So, I may make it function on and above API 24 then disable function on API 23. But the current situation is it's even unable to launch when I just include the package. Could you check it?

JmyW commented 1 year ago

@Phil9l @sbis04 @jonasN5 @domliang Any chance to check it? I'm not requesting to support Android 6.x but at least do not crash the app.