Open faizahmaddae opened 2 years ago
Same issue
Change the minSdkversion from 16 to 21 (In app's build.gradle), this worked in my case.
my minSdkVersion is 24 and i am still having it
any solution ?
Other users may need a lower version of SDK, so let's keep it as what it is now. Thanks
Does any one has a fix for this? I have same issue.
Same issue here
Note: C:\Users\SCC\AppData\Local\Pub\Cache\git\video_thumbnail-6721fbd48f9c2c15fa4c6c824c648088e6026475\android\src\main\java\xyz\justsoft\video_thumbnail\VideoThumbnailPlugin.java uses or overrides a deprecated API?
I recompiled with -xlint and got this:
/Users/redacted/.pub-cache/hosted/pub.dev/video_thumbnail-0.5.3/android/src/main/java/xyz/justsoft/video_thumbnail/VideoThumbnailPlugin.java:103: warning: [deprecation] WEBP in CompressFormat has been deprecated
return Bitmap.CompressFormat.WEBP;
It looks like this is the line with issues: https://github.com/justsoft/video_thumbnail/blob/master/android/src/main/java/xyz/justsoft/video_thumbnail/VideoThumbnailPlugin.java#L103
And a potential solution would be to use Bitmap.CompressFormat.WEBP_LOSSLESS if the API level is 30 or above and use Bitmap.CompressFormat.WEBP if API is less than 30 as referenced here https://stackoverflow.com/questions/59423224/android-bitmap-compressformat-webp-crash
I'm guessing opening a pr with this code would solve the warning:
return Build.VERSION.SDK_INT > 30 ? Bitmap.CompressFormat.WEBP_LOSSLESS : Bitmap.CompressFormat.WEBP;
flutter/.pub-cache/hosted/pub.dartlang.org/video_thumbnail-0.4.3/android/src/main/java/xyz/justsoft/video_thumbnail/VideoThumbnailPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.