GithubHelp home page GithubHelp logo

sawankumarbundelkhandi / edge_detection Goto Github PK

View Code? Open in Web Editor NEW
237.0 10.0 235.0 195.84 MB

This is a flutter plugin to detect edges in a live camera, take the picture of detected edges object, crop it, and save.

Home Page: https://pub.dev/packages/edge_detection

License: Apache License 2.0

Kotlin 19.63% Ruby 1.45% Swift 76.59% Objective-C 0.26% Dart 2.03% C 0.04%
flutter edge-detection android ios opencv scanner wescan flutter-plugin opencv-kotlin scan-tool

edge_detection's Introduction

Hi there πŸ‘‹

my github stats

Top Langs

edge_detection's People

Contributors

ahmadhusein5853 avatar cansavrun avatar cellcs avatar danicma avatar espbee avatar etrigan21 avatar giapnhgc avatar henryleunghk avatar juliocbcotta avatar knottx avatar maltemedocs avatar mrqaidi avatar rodrigoporras avatar rsanjuan87 avatar sawankumarbundelkhandi avatar thesuperiorstanislav avatar vmwsree avatar voronovalexander avatar y-okady avatar yazan99sh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edge_detection's Issues

iPadOS widget is not taking whole screen

In iPadOS, interface is not taking correct screen size.

Test in iphone 7plus, has no this issue.

For iPadOS, whether this issue may come from WeScan? thanks.

IMG_0026

IMG_0027

Attribute application@theme value=(@style/AppTheme)

Hello,
I have the following problem:
When I integrate the plugin I get the error message:

_Attributes application@theme value=(@style/AppTheme) from [:edge_detection] AndroidManifest.xml:13:9-40
	is also present at [:flutter_barcode_scanner]_

The solution offered:

Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:16:5-45:19 to override

doesn't work.

How can I fix the problem?

Pod WeScan version Issue

Xcode's output:
↳
edge_detection/example/ios/Pods/WeScan/WeScan/ImageScannerController.swift:125:14: error: 'bringSubviewToFront' has been renamed to 'bringSubview(toFront:)'
view.bringSubviewToFront(blackFlashView)
^~~~~~~~~~~~~~~~~~~
bringSubview toFront:
UIKit.UIView:17:15: note: 'bringSubviewToFront' was obsoleted in Swift 3
open func bringSubviewToFront(_ view: UIView)
^
edge_detection/example/ios/Pods/WeScan/WeScan/Common/QuadrilateralView.swift:63:29: error: 'bringSubviewToFront' has been renamed to 'bringSubview(toFront:)'
isHighlighted ? bringSubviewToFront(quadView) : sendSubviewToBack(quadView)
^~~~~~~~~~~~~~~~~~~
bringSubview toFront:
UIKit.UIView:17:15: note: 'bringSubviewToFront' was obsoleted in Swift 3
open func bringSubviewToFront(_ view: UIView)
^
edge_detection/example/ios/Pods/WeScan/WeScan/Common/QuadrilateralView.swift:63:61: error: 'sendSubviewToBack' has been renamed to 'sendSubview(toBack:)'
isHighlighted ? bringSubviewToFront(quadView) : sendSubviewToBack(quadView)
^~~~~~~~~~~~~~~~~
sendSubview toBack:
UIKit.UIView:20:15: note: 'sendSubviewToBack' was obsoleted in Swift 3
open func sendSubviewToBack(_ view: UIView)
^
edge_detection/example/ios/Pods/WeScan/WeScan/Scan/ScannerViewController.swift:65:33: error: 'init(style:)' has been renamed to 'init(activityIndicatorStyle:)'
let activityIndicator = UIActivityIndicatorView(style: .gray)
^ ~~~~~
activityIndicatorStyle
UIKit.UIActivityIndicatorView:6:12: note: 'init(style:)' was introduced in Swift 4.2
public init(style: UIActivityIndicatorViewStyle)
^
edge_detection/example/ios/Pods/WeScan/WeScan/Scan/ScannerViewController.swift:65:33: error: 'init(style:)' has been renamed to 'init(activityIndicatorStyle:)'
let activityIndicator = UIActivityIndicatorView(style: .gray)
^ ~~~~~
activityIndicatorStyle
UIKit.UIActivityIndicatorView:6:12: note: 'init(style:)' was introduced in Swift 4.2
public init(style: UIActivityIndicatorViewStyle)
^
edge_detection/example/ios/Pods/WeScan/WeScan/Scan/ScannerViewController.swift:102:45: error: 'sendSubviewToBack' has been renamed to 'sendSubview(toBack:)'
navigationController?.navigationBar.sendSubviewToBack(visualEffectView)
^~~~~~~~~~~~~~~~~
sendSubview toBack:
UIKit.UIView:20:15: note: 'sendSubviewToBack' was obsoleted in Swift 3
open func sendSubviewToBack(_ view: UIView)
^
edge_detection/example/ios/Pods/WeScan/WeScan/Scan/ShutterButton.swift:38:31: error: type 'UIAccessibilityTraits' (aka 'UInt64') has no member 'button'
accessibilityTraits = UIAccessibilityTraits.button
^~~~~~~~~~~~~~~~~~~~~ ~~~~~~
edge_detection/example/ios/Pods/WeScan/WeScan/Scan/ShutterButton.swift:74:30: error: type 'CAMediaTimingFillMode' (aka 'NSString') has no member 'forwards'
animation.fillMode = CAMediaTimingFillMode.forwards

iPad OS 14: orientation in camera view wrong in landscape mode

The camera view in iOS (14, I can't check other versions currently) is rotated by 90 degrees when the device is in landscape mode.
When in portrait mode, the view is correct.

--> the camera view should rotate to correspond to the device's orientation

Gradle task 'assembleDebug' FAILURE: Build failed with an exception.

Hello,

i tried using the demo plugin in a new Flutter Project. Unfortunaly if i run my project i always get the error :

Running Gradle task 'assembleDebug'...
e: /home/dave/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.5/android/src/main/kotlin/com/sample/edgedetection/scan/ScanPresenter.kt: (39, 1): Class 'ScanPresenter' is not abstract and does not implement abstract member public abstract fun surfaceCreated(@nonnull p0: SurfaceHolder): Unit defined in android.view.SurfaceHolder.Callback
e: /home/dave/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.5/android/src/main/kotlin/com/sample/edgedetection/scan/ScanPresenter.kt: (143, 5): 'surfaceCreated' overrides nothing
e: /home/dave/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.5/android/src/main/kotlin/com/sample/edgedetection/scan/ScanPresenter.kt: (147, 5): 'surfaceChanged' overrides nothing
e: /home/dave/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.5/android/src/main/kotlin/com/sample/edgedetection/scan/ScanPresenter.kt: (151, 5): 'surfaceDestroyed' overrides nothing

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':edge_detection:compileDebugKotlin'.

Compilation error. See log for more details

  • 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 1s
Exception: Gradle task assembleDebug failed with exit code 1

It seems that some interfaces changed and the older ones are deprecated. Is it possible to change them? Also i tried running the plugin without my project, this worked but i got a warning :
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.

Would be nice if this could be fixed.

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'edge_detection' is using version 1.2.30.

While Running the Project I got this Error. 'The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'edge_detection' is using version 1.2.30.'. I have Changed the kotlin version to 1.2.30 but I got the Error that 'The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project android is using version 1.2.30.'

How can I solve the Error?

The plugin `edge_detection` uses a deprecated version of the Android embedding.

Received the following error while building:

The plugin edge_detection uses a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

Appears to cause the application to fail when saving the cropped image. Resulting in the error:

Caused by: java.io.FileNotFoundException: /storage/emulated/0/smart_scanner/crop_4543.jpeg: open failed: EPERM (Operation not permitted)

Can provide full trace if needed.

Edge detection while scanning Paper

Your work is too good. Do we have 6 or 8 edge detection.?

Can you please guide me how I can achieve, also its not working accurately while scanning any paper or document.

How can I get the accurate auto edge detection while scanning any document.

Caused by: java.io.FileNotFoundException: /storage/emulated/0/smart_scanner/crop_1513.jpeg: open failed: ENOENT (No such file or directory)

Hi, I am using the latest version of this library.
This is my code which is based on the sample.

void _runEdgeDetection() async {
    print('Running EdgeDetection...');
    String path = '';
    try {
      path = await EdgeDetection.detectEdge;
      print('The saved image path is: $path');
    } on PlatformException catch (e) {
      print('Failed to get cropped image path');
      print(e.message);
    } catch (e) {
      print(e);
    }
  }

After running the code on my device, Camera displays, I accept two permission it requests for, take a picture, crop it and once I click on the done button then the app crashes. When I check my internal files, I confirm there is no such a folder.

I/PaperProcessor(25043): crop finish
I/PaperProcessor(25043): cropped picture: Mat [ 1035*1464*CV_8UC4, isCont=true, isSubmat=false, nativeObj=0x7bc9076da0, dataAddr=0x7b3e489c80 ]
D/ViewRootImpl@30f3618[CropActivity](25043): ViewPostIme pointer 0
D/ViewRootImpl@30f3618[CropActivity](25043): ViewPostIme pointer 1
D/AndroidRuntime(25043): Shutting down VM
E/AndroidRuntime(25043): FATAL EXCEPTION: main
E/AndroidRuntime(25043): Process: com.atco.techne, PID: 25043
E/AndroidRuntime(25043): java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
E/AndroidRuntime(25043): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:506)
E/AndroidRuntime(25043): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
E/AndroidRuntime(25043): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime(25043): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25043): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
E/AndroidRuntime(25043): 	... 1 more
E/AndroidRuntime(25043): Caused by: java.io.FileNotFoundException: /storage/emulated/0/smart_scanner/crop_1884.jpeg: open failed: ENOENT (No such file or directory)
E/AndroidRuntime(25043): 	at libcore.io.IoBridge.open(IoBridge.java:496)
E/AndroidRuntime(25043): 	at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
E/AndroidRuntime(25043): 	at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
E/AndroidRuntime(25043): 	at com.sample.edgedetection.crop.CropPresenter.save(CropPresenter.kt:129)
E/AndroidRuntime(25043): 	at com.sample.edgedetection.crop.CropActivity.onOptionsItemSelected(CropActivity.kt:55)
E/AndroidRuntime(25043): 	at android.app.Activity.onMenuItemSelected(Activity.java:4182)
E/AndroidRuntime(25043): 	at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:384)
E/AndroidRuntime(25043): 	at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196)
E/AndroidRuntime(25043): 	at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
E/AndroidRuntime(25043): 	at androidx.appcompat.app.AppCompatDelegateImpl.onMenuItemSelected(AppCompatDelegateImpl.java:888)
E/AndroidRuntime(25043): 	at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
E/AndroidRuntime(25043): 	at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
E/AndroidRuntime(25043): 	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
E/AndroidRuntime(25043): 	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981)
E/AndroidRuntime(25043): 	at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
E/AndroidRuntime(25043): 	at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
E/AndroidRuntime(25043): 	at android.view.View.performClick(View.java:7869)
E/AndroidRuntime(25043): 	at android.widget.TextView.performClick(TextView.java:14958)
E/AndroidRuntime(25043): 	at android.view.View.performClickInternal(View.java:7838)
E/AndroidRuntime(25043): 	at android.view.View.access$3600(View.java:886)
E/AndroidRuntime(25043): 	at android.view.View$PerformClick.run(View.java:29362)
E/AndroidRuntime(25043): 	at android.os.Handler.handleCallback(Handler.java:883)
E/AndroidRuntime(25043): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime(25043): 	at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(25043): 	at android.app.ActivityThread.main(ActivityThread.java:8125)
E/AndroidRuntime(25043): 	... 3 more
E/AndroidRuntime(25043): Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
E/AndroidRuntime(25043): 	at libcore.io.Linux.open(Native Method)
E/AndroidRuntime(25043): 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/AndroidRuntime(25043): 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
E/AndroidRuntime(25043): 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/AndroidRuntime(25043): 	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8002)
E/AndroidRuntime(25043): 	at libcore.io.IoBridge.open(IoBridge.java:482)
E/AndroidRuntime(25043): 	... 27 more
I/Process (25043): Sending signal. PID: 25043 SIG: 9
Lost connection to device.

Does not specify a Swift version

Hello,

after embedding the plugin into my project I get the error message:

Unable to determine Swift version for the following pods:
- edge_detection does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

How can the error be corrected?

File not found exception

I Run the example of this repo and i found file not found exception.

Caused by: java.io.FileNotFoundException: /storage/emulated/0/smart_scanner/crop_1125.jpeg: open failed: EACCES (Permission denied)

Saving picture fails on Android 10+

As described in #33, saving a picture on Android results in

E/AndroidRuntime(21257): FATAL EXCEPTION: main
E/AndroidRuntime(21257): Process: com.ome.dietgene.dev, PID: 21257
E/AndroidRuntime(21257): java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
E/AndroidRuntime(21257): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526)
E/AndroidRuntime(21257): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/AndroidRuntime(21257): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime(21257): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(21257): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
E/AndroidRuntime(21257): ... 1 more
E/AndroidRuntime(21257): Caused by: java.io.FileNotFoundException: /storage/emulated/0/smart_scanner/crop_16732.jpeg: open failed: EACCES (Permission denied)
E/AndroidRuntime(21257): at libcore.io.IoBridge.open(IoBridge.java:496)
E/AndroidRuntime(21257): at java.io.FileOutputStream.(FileOutputStream.java:235)
E/AndroidRuntime(21257): at java.io.FileOutputStream.(FileOutputStream.java:186)
E/AndroidRuntime(21257): at com.sample.edgedetection.crop.CropPresenter.save(CropPresenter.kt:129)
E/AndroidRuntime(21257): at com.sample.edgedetection.crop.CropActivity.onOptionsItemSelected(CropActivity.kt:55)
E/AndroidRuntime(21257): at android.app.Activity.onMenuItemSelected(Activity.java:4155)
E/AndroidRuntime(21257): at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:384)
E/AndroidRuntime(21257): at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:219)
E/AndroidRuntime(21257): at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
E/AndroidRuntime(21257): at androidx.appcompat.app.AppCompatDelegateImpl.onMenuItemSelected(AppCompatDelegateImpl.java:1030)
E/AndroidRuntime(21257): at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
E/AndroidRuntime(21257): at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
E/AndroidRuntime(21257): at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
E/AndroidRuntime(21257): at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981)
E/AndroidRuntime(21257): at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
E/AndroidRuntime(21257): at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
E/AndroidRuntime(21257): at android.view.View.performClick(View.java:7201)
E/AndroidRuntime(21257): at android.view.View.performClickInternal(View.java:7170)
E/AndroidRuntime(21257): at android.view.View.access$3500(View.java:806)
E/AndroidRuntime(21257): at android.view.View$PerformClick.run(View.java:27582)
E/AndroidRuntime(21257): at android.os.Handler.handleCallback(Handler.java:883)
E/AndroidRuntime(21257): at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime(21257): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(21257): at android.app.ActivityThread.main(ActivityThread.java:7710)
E/AndroidRuntime(21257): ... 3 more
E/AndroidRuntime(21257): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
E/AndroidRuntime(21257): at libcore.io.Linux.open(Native Method)
E/AndroidRuntime(21257): at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/AndroidRuntime(21257): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
E/AndroidRuntime(21257): at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/AndroidRuntime(21257): at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7609)
E/AndroidRuntime(21257): at libcore.io.IoBridge.open(IoBridge.java:482)
E/AndroidRuntime(21257): ... 26 more

because of https://developer.android.com/training/data-storage#scoped-storage.

Google Play will require app updates to have targetSdk 29+ from 2 November 2020 https://developer.android.com/distribute/best-practices/develop/target-sdk#pre10 , so the plugin will become essentially unusable if the bug is not fixed

Application gets crashed as soon as the edge_detection method is initiated in flutter.

Application gets crashed as soon as the edge_detection method is initiated in flutter.

app/build.gradle :-
compileSdkVersion 28
minSdkVersion 21
targetSdkVersion 28

android/build.gradle :-
dependencies added -
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.google.gms:google-services:4.3.3'

Android.manifest :-

android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|
density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/LaunchTheme"
android:usesCleartextTraffic="true"
android:windowSoftInputMode="adjustResize">

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.test.dev, PID: 14487
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.dev/com.sample.edgedetection.scan.ScanActivity}: android.view.InflateException: Binary XML file line #17 in com.test.dev:layout/abc_screen_toolbar: Binary XML file line #17 in com.test.dev:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.ActionBarOverlayLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3477)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3620)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2183)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:241)
at android.app.ActivityThread.main(ActivityThread.java:7617)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
Caused by: android.view.InflateException: Binary XML file line #17 in com.test.dev:layout/abc_screen_toolbar: Binary XML file line #17 in com.test.dev:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.ActionBarOverlayLayout
Caused by: android.view.InflateException: Binary XML file line #17 in com.test.dev:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.ActionBarOverlayLayout
Caused by: java.lang.ClassNotFoundException: androidx.appcompat.widget.ActionBarOverlayLayout
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at android.view.LayoutInflater.createView(LayoutInflater.java:815)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
at android.view.LayoutInflater.inflate(LayoutInflater.java:659)
at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:749)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:552)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.sample.edgedetection.base.BaseActivity.onCreate(BaseActivity.kt:15)
at android.app.Activity.performCreate(Activity.java:7817)
at android.app.Activity.performCreate(Activity.java:7806)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1328)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3452)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3620)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2183)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:241)
at android.app.ActivityThread.main(ActivityThread.java:7617)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: androidx.appcompat.widget.ActionBarOverlayLayout
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 28 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/NestedScrollingParent3;
... 28 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.view.NestedScrollingParent3" on path: DexPathList[[zip file "/data/app/com.test.dev-w8KbJf7juztB_q3NicCDsQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.test.dev-w8KbJf7juztB_q3NicCDsQ==/lib/arm64, /data/app/com.test.dev-w8KbJf7juztB_q3NicCDsQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 28 more

Also it shows error at BaseActivity.kt setContentView(provideContentViewId()).

OpenCV library not loading

Hi I'm trying to work with edge detection, it used to work but i upgraded flutter to 2.2.2 and stopped working, running the app in the device wont detect any edge and in the bundle in the play store will make the app crash

D/OpenCV/StaticHelper(22192): Trying to get library list E/OpenCV/StaticHelper(22192): OpenCV error: Cannot load info library for OpenCV D/OpenCV/StaticHelper(22192): Library list: "" D/OpenCV/StaticHelper(22192): First attempt to load libs D/OpenCV/StaticHelper(22192): Trying to init OpenCV libs D/OpenCV/StaticHelper(22192): Trying to load library opencv_java3 I/OpenCV (22192): calling android_getCpuFeatures() ... I/OpenCV (22192): calling android_getCpuFeatures() ... Done (1f7ff) D/OpenCV/StaticHelper(22192): Library opencv_java3 loaded D/OpenCV/StaticHelper(22192): First attempt to load libs is OK I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): General configuration for OpenCV 3.3.0 ===================================== I/OpenCV/StaticHelper(22192): Version control: 3.3.0 I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Platform: I/OpenCV/StaticHelper(22192): Timestamp: 2017-08-04T00:30:10Z I/OpenCV/StaticHelper(22192): Host: Linux 4.8.0-58-generic x86_64 I/OpenCV/StaticHelper(22192): Target: Linux 1 armv7-a I/OpenCV/StaticHelper(22192): CMake: 2.8.12.2 I/OpenCV/StaticHelper(22192): CMake generator: Ninja I/OpenCV/StaticHelper(22192): CMake build tool: /usr/bin/ninja I/OpenCV/StaticHelper(22192): Configuration: Release I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): CPU/HW features: I/OpenCV/StaticHelper(22192): Baseline: NEON NEON I/OpenCV/StaticHelper(22192): requested: DETECT I/OpenCV/StaticHelper(22192): required: NEON I/OpenCV/StaticHelper(22192): disabled: VFPV3 I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): C/C++: I/OpenCV/StaticHelper(22192): Built as dynamic libs?: NO I/OpenCV/StaticHelper(22192): C++ Compiler: /usr/bin/ccache /opt/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ (ver 4.8) I/OpenCV/StaticHelper(22192): C++ flags (Release): -fexceptions -frtti -fpic -Wno-psabi --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfpu=neon -mfp16-format=ieee -fvisibility=hidden -fvisibility-inlines-hidden -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG -DNDEBUG I/OpenCV/StaticHelper(22192): C++ flags (Debug): -fexceptions -frtti -fpic -Wno-psabi --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfpu=neon -mfp16-format=ieee -fvisibility=hidden -fvisibility-inlines-hidden -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG -DDEBUG -D_DEBUG I/OpenCV/StaticHelper(22192): C Compiler: /usr/bin/ccache /opt/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc I/OpenCV/StaticHelper(22192): C flags (Release): -fexceptions -fpic -Wno-psabi --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfpu=neon -mfp16-format=ieee -fvisibility=hidden -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG -DNDEBUG I/OpenCV/StaticHelper(22192): C flags (Debug): -fexceptions -fpic -Wno-psabi --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfpu=neon -mfp16-format=ieee -fvisibility=hidden -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG -DDEBUG -D_DEBUG I/OpenCV/StaticHelper(22192): Linker flags (Release): -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now I/OpenCV/StaticHelper(22192): Linker flags (Debug): -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now I/OpenCV/StaticHelper(22192): ccache: YES I/OpenCV/StaticHelper(22192): Precompiled headers: NO I/OpenCV/StaticHelper(22192): Extra dependencies: z dl m log I/OpenCV/StaticHelper(22192): 3rdparty dependencies: cpufeatures libprotobuf libjpeg libwebp libpng libtiff libjasper IlmImf tegra_hal tbb I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): OpenCV modules: I/OpenCV/StaticHelper(22192): To be built: core flann imgproc ml objdetect photo video dnn imgcodecs shape videoio highgui superres ts features2d calib3d java stitching videostab I/OpenCV/StaticHelper(22192): Disabled: world I/OpenCV/StaticHelper(22192): Disabled by dependency: - I/OpenCV/StaticHelper(22192): Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 viz I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Android: I/OpenCV/StaticHelper(22192): Android ABI: armeabi-v7a with NEON I/OpenCV/StaticHelper(22192): STL type: gnustl_static I/OpenCV/StaticHelper(22192): Native API level: android-9 I/OpenCV/StaticHelper(22192): SDK target: android-11 I/OpenCV/StaticHelper(22192): Android NDK: /opt/android/android-ndk-r10e (toolchain: arm-linux-androideabi-4.8) I/OpenCV/StaticHelper(22192): android tool: /opt/android/android-sdk-java7/tools/android (Android SDK Tools, revision 25.2.2.) I/OpenCV/StaticHelper(22192): Google Play manager: NO I/OpenCV/StaticHelper(22192): Android examples: YES I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): GUI: I/OpenCV/StaticHelper(22192): GTK+: NO I/OpenCV/StaticHelper(22192): GThread : NO I/OpenCV/StaticHelper(22192): GtkGlExt: NO I/OpenCV/StaticHelper(22192): OpenGL support: NO I/OpenCV/StaticHelper(22192): VTK support: NO I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Media I/O: I/OpenCV/StaticHelper(22192): ZLib: z (ver 1.2.3) I/OpenCV/StaticHelper(22192): JPEG: build (ver 90) I/OpenCV/StaticHelper(22192): WEBP: build (ver encoder: 0x020e) I/OpenCV/StaticHelper(22192): PNG: build (ver 1.6.24) I/OpenCV/StaticHelper(22192): TIFF: build (ver 42 - 4.0.2) I/OpenCV/StaticHelper(22192): JPEG 2000: build (ver 1.900.1) I/OpenCV/StaticHelper(22192): OpenEXR: build (ver 1.7.1) I/OpenCV/StaticHelper(22192): GDAL: NO I/OpenCV/StaticHelper(22192): GDCM: NO I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Video I/O: I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Parallel framework: TBB (ver 4.4 interface 9003) I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Trace: YES () I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Other third-party libraries: I/OpenCV/StaticHelper(22192): Use Intel IPP: NO I/OpenCV/StaticHelper(22192): Use Intel IPP IW: NO I/OpenCV/StaticHelper(22192): Use Eigen: NO I/OpenCV/StaticHelper(22192): Use Cuda: NO I/OpenCV/StaticHelper(22192): Use OpenCL: NO I/OpenCV/StaticHelper(22192): Use OpenVX: NO I/OpenCV/StaticHelper(22192): Use custom HAL: YES (carotene (ver 0.0.1)) I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Python 2: I/OpenCV/StaticHelper(22192): Interpreter: /usr/bin/python2.7 (ver 2.7.6) I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Python 3: I/OpenCV/StaticHelper(22192): Interpreter: /usr/bin/python3.4 (ver 3.4.3) I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Python (for build): /usr/bin/python2.7 I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Java: I/OpenCV/StaticHelper(22192): ant: /usr/bin/ant (ver 1.9.3) I/OpenCV/StaticHelper(22192): Java wrappers: YES I/OpenCV/StaticHelper(22192): Java tests: YES I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Matlab: NO I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Tests and samples: I/OpenCV/StaticHelper(22192): Tests: YES I/OpenCV/StaticHelper(22192): Performance tests: NO I/OpenCV/StaticHelper(22192): C/C++ Examples: NO I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): Install path: /build/master_pack-android/build/o4a/install I/OpenCV/StaticHelper(22192): I/OpenCV/StaticHelper(22192): cvconfig.h is in: /build/master_pack-android/build/o4a I/OpenCV/StaticHelper(22192): -----------------------------------------------------------------

Thank you so much

6,8 edge crop option

I am using this plugin extensively for a project and genuinely require a 6 or 8 edge crop option.
Any solution regarding this?

"saveAttributeDataForStyleable" static method not found

When I initiate edge_detection plugin app crashes showing following error:

java.lang.NoSuchMethodError: No static method saveAttributeDataForStyleable(Landroid/view/View;Landroid/content/Context;[ILandroid/util/AttributeSet;Landroid/content/res/TypedArray;II)V in class Landroidx/core/view/ViewCompat; or its super classes (declaration of 'androidx.core.view.ViewCompat' appears in /data/app/com.smartmd.messaging.dev-Ufcnw2cak6RG1BBZHLm2Iw==/base.apk)
E/AndroidRuntime(15727): at androidx.appcompat.widget.AppCompatBackgroundHelper.loadFromAttributes(AppCompatBackgroundHelper.java:51)
E/AndroidRuntime(15727): at androidx.appcompat.widget.AppCompatImageView.(AppCompatImageView.java:79)
E/AndroidRuntime(15727): at androidx.appcompat.widget.AppCompatImageView.(AppCompatImageView.java:69)
E/AndroidRuntime(15727): at androidx.appcompat.app.AppCompatViewInflater.createImageView(AppCompatViewInflater.java:199)
E/AndroidRuntime(15727): at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:119)
E/AndroidRuntime(15727): at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1551)
E/AndroidRuntime(15727): at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1602)
E/AndroidRuntime(15727): at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1061)
E/AndroidRuntime(15727): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:997)
E/AndroidRuntime(15727): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
E/AndroidRuntime(15727): at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
E/AndroidRuntime(15727): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
E/AndroidRuntime(15727): at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)
E/AndroidRuntime(15727): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
E/AndroidRuntime(15727): at android.view.LayoutInflater.inflate(LayoutInflater.java:682)
E/AndroidRuntime(15727): at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
E/AndroidRuntime(15727): at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
E/AndroidRuntime(15727): at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
E/AndroidRuntime(15727): at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
E/AndroidRuntime(15727): at com.sample.edgedetection.base.BaseActivity.onCreate(BaseActivity.kt:13)
E/AndroidRuntime(15727): at android.app.Activity.performCreate(Activity.java:7957)
E/AndroidRuntime(15727): at android.app.Activity.performCreate(Activity.java:7946)
E/AndroidRuntime(15727): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
E/AndroidRuntime(15727): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3530)
E/AndroidRuntime(15727): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3707)
E/AndroidRuntime(15727): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
E/AndroidRuntime(15727): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(15727): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(15727): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2220)
E/AndroidRuntime(15727): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(15727): at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(15727): at android.app.ActivityThread.main(ActivityThread.java:8019)
E/AndroidRuntime(15727): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15727): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(15727): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

App Gradle:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '6'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.2.1'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
    disable 'InvalidPackage'
}

defaultConfig {
    applicationId "com.smartmd.messaging"
    minSdkVersion 26
    targetSdkVersion 29
    multiDexEnabled true
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    //ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}

buildTypes {
    release {
        //signingConfig signingConfigs.release
       // minifyEnabled true
        useProguard true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        ndk {
            abiFilters 'armeabi-v7a', "arm64-v8a"
        }
    }

    debug {
        minifyEnabled false
        useProguard false

// ndk {
// abiFilters 'armeabi-v7a', "arm64-v8a"
// }
}
}

flavorDimensions "flavors"

productFlavors {
    development {
        dimension "flavors"
        applicationIdSuffix ".dev"
        versionName "5.3.5"
        versionCode 157
    }
    production {
        dimension "flavors"
        versionName "5.3.0"
        versionCode 133
    }
    lilydev {
        dimension "flavors"
        applicationId "com.smartmd.lily.dev"
        versionName "5.3.5"
        versionCode 157
    }
    lilyprod {
        dimension "flavors"
        applicationId "com.smartmd.lily"
        versionName "5.0.2"
        versionCode 134
    }
}

}

flutter {
source '../..'
}

dependencies {
implementation 'com.android.support:multidex:1.0.3' // use latest version
implementation 'com.pubnub:pubnub-gson:4.29.2'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.firebase:firebase-core:18.0.0'

//implementation 'com.google.firebase:firebase-auth:18.1.0'
implementation 'com.google.firebase:firebase-messaging:21.0.0'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
api 'com.github.davidmigloz:opencv-android-gradle-repo:3.3.0'

implementation group: 'joda-time', name: 'joda-time', version: '2.9.9'
//implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

// Add the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'

// Recommended: Add the Google Analytics SDK.
implementation 'com.google.firebase:firebase-analytics:18.0.0'

implementation 'org.jsoup:jsoup:1.9.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

//apply plugin: 'io.fabric'

Do we have 6 or 8 edge detection

Your work is too good. Do we have 6 or 8 edge detection.?

Can you please guide me how I can achieve, also its not working accurately while scanning any paper or document.

How can I get the accurate auto edge detection while scanning any document.

Cropped image taking unwanted extra space

Hi Team,

Facing an issue with android devices.

After plotting edge points on scanned image, The resultant image is different from the one selected with edges i.e The image appears to be taking an extra space from top and cuts out the image from bottom.

Crash in release

Hi, my app in debug its working smoothly but when i release the app its crashing when I open the scanner

Flutter: v2.2.3
NDK: 21.4.7075529
Compile SDK Version: 30

`
2021-07-21 14:54:10.798 31887-31887/? D/OpenCV/StaticHelper: Trying to get library list
2021-07-21 14:54:10.801 31887-31887/? E/OpenCV/StaticHelper: OpenCV error: Cannot load info library for OpenCV
2021-07-21 14:54:10.801 31887-31887/? D/OpenCV/StaticHelper: Library list: ""
2021-07-21 14:54:10.801 31887-31887/? D/OpenCV/StaticHelper: First attempt to load libs
2021-07-21 14:54:10.801 31887-31887/? D/OpenCV/StaticHelper: Trying to init OpenCV libs
2021-07-21 14:54:10.801 31887-31887/? D/OpenCV/StaticHelper: Trying to load library opencv_java3
2021-07-21 14:54:10.809 2081-2298/? D/NetworkController.MobileSignalController(0/9): onDataActivity: direction=0
2021-07-21 14:54:10.809 2306-2509/? D/EPDGΒ --Β SIM0Β [EpdgSubScription]: onDataActivity: direction=0
2021-07-21 14:54:10.811 2081-2081/? D/SecStatusBarMobileView: updateState: MobileIconState(subId=9, strengthId=2131232610, roaming=false, typeId=2131232468, roamingId=0, activityId=2131232640, slotId=0, visible=true)
2021-07-21 14:54:10.819 1446-1487/? E/Watchdog: !@sync 661 [2021-07-21 14:54:10.819] FD count : 524, wdog_way : softdog
2021-07-21 14:54:10.820 31887-31887/? I/OpenCV: calling android_getCpuFeatures() ...
2021-07-21 14:54:10.821 31887-31887/? I/OpenCV: calling android_getCpuFeatures() ... Done (1f7ff)
2021-07-21 14:54:10.844 31887-31887/? D/OpenCV/StaticHelper: Library opencv_java3 loaded
2021-07-21 14:54:10.844 31887-31887/? D/OpenCV/StaticHelper: First attempt to load libs is OK
2021-07-21 14:54:10.845 31887-31887/? E/ansport.driver: No implementation found for java.lang.String i.a.b.a.b() (tried Java_i_a_b_a_b and Java_i_a_b_a_b__)
2021-07-21 14:54:10.847 31887-31887/? D/AndroidRuntime: Shutting down VM

--------- beginning of crash

2021-07-21 14:54:10.848 31887-31887/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.robotransport.drivers, PID: 31887
java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String i.a.b.a.b() (tried Java_i_a_b_a_b and Java_i_a_b_a_b__)
at i.a.b.a.b(Native Method)
at i.a.b.a.a(Unknown Source:0)
at i.a.a.b.b(:2)
at i.a.a.a.a(Unknown Source:1)
at com.sample.edgedetection.scan.ScanActivity.n(Unknown Source:0)
at c.m.a.f.a.onCreate(Unknown Source:23)
at android.app.Activity.performCreate(Activity.java:7957)
at android.app.Activity.performCreate(Activity.java:7946)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3598)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3775)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2261)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8107)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
2021-07-21 14:54:10.852 1446-6167/? D/DeviceReportingSecurityChecker: mIsICDStatus === true mIsTmoSim == true mIsMyAccountSignature== true
2021-07-21 14:54:10.852 1446-1491/? D/ActivityManager: TMO APP_STATE_BROADCAST_STOP_MSG
2021-07-21 14:54:10.852 1446-1491/? D/AppStateBroadcaster: sendApplicationStop(com.demo.app, 31887, 3) called from com.android.server.am.ActivityManagerService$MainHandler.handleMessage(ActivityManagerService.java:2099)
2021-07-21 14:54:10.852 1446-32017/? I/DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2`

Can we do papers OCR ready?

Hello,
I tested this plugins, it's detect everything i just want to detect paper, because if have square in paper it detects firs square :) so i just want to detect paper like WeScan and second is when detect paper i want to change it black & white and heigh resolution for OCR ready.

Can you give suggestion?

[Android]'minBy((T) -> R): T?' is an error. Use minByOrNull instead.

e: /Users/osmancan/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.6/android/src/main/kotlin/com/sample/edgedetection/processor/PaperProcessor.kt: (139, 21): Using 'minBy((T) -> R): T?' is an error. Use minByOrNull instead.
e: /Users/osmancan/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.6/android/src/main/kotlin/com/sample/edgedetection/processor/PaperProcessor.kt: (140, 21): Using 'minBy((T) -> R): T?' is an error. Use minByOrNull instead.
e: /Users/osmancan/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.6/android/src/main/kotlin/com/sample/edgedetection/processor/PaperProcessor.kt: (141, 21): Using 'maxBy((T) -> R): T?' is an error. Use maxByOrNull instead.
e: /Users/osmancan/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.6/android/src/main/kotlin/com/sample/edgedetection/processor/PaperProcessor.kt: (142, 21): Using 'maxBy((T) -> R): T?' is an error. Use maxByOrNull instead.
e: /Users/osmancan/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.6/android/src/main/kotlin/com/sample/edgedetection/scan/ScanPresenter.kt: (260, 53): Using 'maxBy((T) -> R): T?' is an error. Use maxByOrNull instead.
e: /Users/osmancan/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.6/android/src/main/kotlin/com/sample/edgedetection/view/PaperRectangle.kt: (141, 29): Using 'minBy((T) -> R): T?' is an error. Use minByOrNull instead.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':edge_detection:compileDebugKotlin'.

Compilation error. See log for more details

  • 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 31s
Exception: Gradle task assembleDebug failed with exit code 1

Autofocus doesn't work on some devices

First of all, i am very grateful with this package, it was so useful and i saved a lot of time. At the implementation i was getting a crash on some old devices that not support autofocus continuos picture, so i modified the code in kotlin and now i can run the app. here is my modification for someone that maybe need it.

if  (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS) && mCamera!!.parameters.getSupportedFocusModes().contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) 

{
            param?.focusMode = Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE
            Log.d(TAG, "enabling autofocus")
        } else {
            Log.d(TAG, "autofocus not available")
        }

Detect Edges from gallery

First of all Thank you for the great lib, and now my question is how to detect edges from gallery (i.e. from existing pic) using this lib?

Exception: java.lang.RuntimeException: setParameters failed

I copied the required OpenCV folders in the project. When I started the application, I stumbled upon the error below.
It is pointing to Camera.java which is a native implementation, invoked by initCamera in ScanPresenter.kt.

@sawankumarbundelkhandi Can you suggest a solution?

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Waiting for Android SDK built for x86 to report its views...
D/EGL_emulation( 9477): eglMakeCurrent: 0xe5cc12a0: ver 2 0 (tinfo 0xda884fd0)
D/eglCodecCommon( 9477): setVertexArrayObject: set vao to 0 (0) 1 0
Debug service listening on ws://127.0.0.1:60847/6OLSB5QpglE=/ws
Syncing files to device Android SDK built for x86...
W/ActivityThread( 9477): handleWindowVisibility: no activity for token android.os.BinderProxy@38be9b7
W/om.pixeleye.ap( 9477): Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/om.pixeleye.ap( 9477): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
D/OpenCV/StaticHelper( 9477): Trying to get library list
E/OpenCV/StaticHelper( 9477): OpenCV error: Cannot load info library for OpenCV
D/OpenCV/StaticHelper( 9477): Library list: ""
D/OpenCV/StaticHelper( 9477): First attempt to load libs
D/OpenCV/StaticHelper( 9477): Trying to init OpenCV libs
D/OpenCV/StaticHelper( 9477): Trying to load library opencv_java3
D/OpenCV/StaticHelper( 9477): Library opencv_java3 loaded
D/OpenCV/StaticHelper( 9477): First attempt to load libs is OK
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477): General configuration for OpenCV 3.4.3 =====================================
I/OpenCV/StaticHelper( 9477):   Version control:               3.4.3
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Platform:
I/OpenCV/StaticHelper( 9477):     Timestamp:                   2018-08-29T10:32:02Z
I/OpenCV/StaticHelper( 9477):     Host:                        Linux 4.15.0-33-generic x86_64
I/OpenCV/StaticHelper( 9477):     Target:                      Linux 1 i686
I/OpenCV/StaticHelper( 9477):     CMake:                       2.8.12.2
I/OpenCV/StaticHelper( 9477):     CMake generator:             Ninja
I/OpenCV/StaticHelper( 9477):     CMake build tool:            /usr/bin/ninja
I/OpenCV/StaticHelper( 9477):     Configuration:               Release
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   CPU/HW features:
I/OpenCV/StaticHelper( 9477):     Baseline:                    SSE SSE2
I/OpenCV/StaticHelper( 9477):       requested:                 SSE2
I/OpenCV/StaticHelper( 9477):     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX
I/OpenCV/StaticHelper( 9477):       requested:                 SSE4_1 SSE4_2 AVX FP16
I/OpenCV/StaticHelper( 9477):       SSE4_1 (3 files):          + SSE3 SSSE3 SSE4_1
I/OpenCV/StaticHelper( 9477):       SSE4_2 (1 files):          + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2
I/OpenCV/StaticHelper( 9477):       FP16 (1 files):            + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
I/OpenCV/StaticHelper( 9477):       AVX (5 files):             + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 AVX
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   C/C++:
I/OpenCV/StaticHelper( 9477):     Built as dynamic libs?:      NO
I/OpenCV/StaticHelper( 9477):     C++ Compiler:                /usr/bin/ccache /opt/android/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-g++ (ver 4.8)
I/OpenCV/StaticHelper( 9477):     C++ flags (Release):         -fexceptions -frtti -fpic --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-x86 -funwind-tables -funswitch-loops -finline-limit=300 -fsigned-char -no-canonical-prefixes -fdata-sections -ffunction-sections -Wa,--noexecstack  -DANDROID -D__ANDROID_API__=9   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer  -msse -msse2 -mfpmath=sse -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -O3 -DNDEBUG  -DNDEBUG
I/OpenCV/StaticHelper( 9477):     C++ flags (Debug):           -fexceptions -frtti -fpic --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-x86 -funwind-tables -funswitch-loops -finline-limit=300 -fsigned-char -no-canonical-prefixes -fdata-sections -ffunction-sections -Wa,--noexecstack  -DANDROID -D__ANDROID_API__=9   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer  -msse -msse2 -mfpmath=sse -fvisibility=hidden -fvisibility-inlines-hidden -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -DDEBUG -D_DEBUG
I/OpenCV/StaticHelper( 9477):     C Compiler:                  /usr/bin/ccache /opt/android/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-gcc
I/OpenCV/StaticHelper( 9477):     C flags (Release):           -fexceptions -fpic --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-x86 -funwind-tables -funswitch-loops -finline-limit=300 -fsigned-char -no-canonical-prefixes -fdata-sections -ffunction-sections -Wa,--noexecstack  -DANDROID -D__ANDROID_API__=9   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer  -msse -msse2 -mfpmath=sse -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing -O3 -DNDEBUG  -DNDEBUG
I/OpenCV/StaticHelper( 9477):     C flags (Debug):             -fexceptions -fpic --sysroot=/opt/android/android-ndk-r10e/platforms/android-9/arch-x86 -funwind-tables -funswitch-loops -finline-limit=300 -fsigned-char -no-canonical-prefixes -fdata-sections -ffunction-sections -Wa,--noexecstack  -DANDROID -D__ANDROID_API__=9   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer  -msse -msse2 -mfpmath=sse -fvisibility=hidden -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -DDEBUG -D_DEBUG
I/OpenCV/StaticHelper( 9477):     Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a  -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now    
I/OpenCV/StaticHelper( 9477):     Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a  -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now    
I/OpenCV/StaticHelper( 9477):     ccache:                      YES
I/OpenCV/StaticHelper( 9477):     Precompiled headers:         NO
I/OpenCV/StaticHelper( 9477):     Extra dependencies:          z dl m log
I/OpenCV/StaticHelper( 9477):     3rdparty dependencies:       libjpeg-turbo libwebp libpng libtiff libjasper IlmImf libprotobuf tbb libcpufeatures ittnotify ippiw ippicv
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   OpenCV modules:
I/OpenCV/StaticHelper( 9477):     To be built:                 calib3d core dnn features2d flann highgui imgcodecs imgproc java java_bindings_generator ml objdetect photo python_bindings_generator shape stitching superres video videoio videostab
I/OpenCV/StaticHelper( 9477):     Disabled:                    js world
I/OpenCV/StaticHelper( 9477):     Disabled by dependency:      -
I/OpenCV/StaticHelper( 9477):     Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 ts viz
I/OpenCV/StaticHelper( 9477):     Applications:                android_examples
I/OpenCV/StaticHelper( 9477):     Documentation:               NO
I/OpenCV/StaticHelper( 9477):     Non-free algorithms:         NO
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Android NDK:                   location: /opt/android/android-ndk-r10e
I/OpenCV/StaticHelper( 9477):     Android ABI:                 x86
I/OpenCV/StaticHelper( 9477):     NDK toolchain:               x86-4.8
I/OpenCV/StaticHelper( 9477):     STL type:                    gnustl_static
I/OpenCV/StaticHelper( 9477):     Native API level:            9
I/OpenCV/StaticHelper( 9477):   Android SDK:                   /opt/android/android-sdk-java7 (tools: 25.2.2 build tools: 23.0.3)
I/OpenCV/StaticHelper( 9477):     android tool:                /opt/android/android-sdk-java7/tools/android
I/OpenCV/StaticHelper( 9477):     SDK target:                  android-14
I/OpenCV/StaticHelper( 9477):     Projects build scripts:      Ant/Eclipse compatible
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   GUI: 
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Media I/O: 
I/OpenCV/StaticHelper( 9477):     ZLib:                        z (ver 1.2.3)
I/OpenCV/StaticHelper( 9477):     JPEG:                        build-libjpeg-turbo (ver 1.5.3-62)
I/OpenCV/StaticHelper( 9477):     WEBP:                        build (ver encoder: 0x020e)
I/OpenCV/StaticHelper( 9477):     PNG:                         build (ver 1.6.34)
I/OpenCV/StaticHelper( 9477):     TIFF:                        build (ver 42 - 4.0.9)
I/OpenCV/StaticHelper( 9477):     JPEG 2000:                   build (ver 1.900.1)
I/OpenCV/StaticHelper( 9477):     OpenEXR:                     build (ver 1.7.1)
I/OpenCV/StaticHelper( 9477):     HDR:                         YES
I/OpenCV/StaticHelper( 9477):     SUNRASTER:                   YES
I/OpenCV/StaticHelper( 9477):     PXM:                         YES
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Video I/O:
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Parallel framework:            TBB (ver 2018.0 interface 10001)
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Trace:                         YES (with Intel ITT)
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Other third-party libraries:
I/OpenCV/StaticHelper( 9477):     Intel IPP:                   2017.0.3 [2017.0.3]
I/OpenCV/StaticHelper( 9477):            at:                   /build/3_4_pack-android/build/o4a/3rdparty/ippicv/ippicv_lnx
I/OpenCV/StaticHelper( 9477):     Intel IPP IW:                sources (2017.0.3)
I/OpenCV/StaticHelper( 9477):               at:                /build/3_4_pack-android/build/o4a/3rdparty/ippicv/ippiw_lnx
I/OpenCV/StaticHelper( 9477):     Custom HAL:                  NO
I/OpenCV/StaticHelper( 9477):     Protobuf:                    build (3.5.1)
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Python (for build):            /usr/bin/python2.7
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Java:                          export all functions
I/OpenCV/StaticHelper( 9477):     ant:                         /usr/bin/ant (ver 1.9.3)
I/OpenCV/StaticHelper( 9477):     Java wrappers:               YES
I/OpenCV/StaticHelper( 9477):     Java tests:                  NO
I/OpenCV/StaticHelper( 9477): 
I/OpenCV/StaticHelper( 9477):   Install to:                    /build/3_4_pack-android/build/o4a/install
I/OpenCV/StaticHelper( 9477): -----------------------------------------------------------------
I/ScanPresenter( 9477): camera null
D/ScanPresenter( 9477): autofocus not available
E/SurfaceView( 9477): Exception configuring surface
E/SurfaceView( 9477): java.lang.RuntimeException: setParameters failed
E/SurfaceView( 9477): 	at android.hardware.Camera.native_setParameters(Native Method)
E/SurfaceView( 9477): 	at android.hardware.Camera.setParameters(Camera.java:2117)
E/SurfaceView( 9477): 	at com.sample.edgedetection.scan.ScanPresenter.initCamera(ScanPresenter.kt:139)
E/SurfaceView( 9477): 	at com.sample.edgedetection.scan.ScanPresenter.surfaceCreated(ScanPresenter.kt:144)
E/SurfaceView( 9477): 	at android.view.SurfaceView.updateSurface(SurfaceView.java:758)
E/SurfaceView( 9477): 	at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:155)
E/SurfaceView( 9477): 	at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1088)
E/SurfaceView( 9477): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2745)
E/SurfaceView( 9477): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1721)
E/SurfaceView( 9477): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7598)
E/SurfaceView( 9477): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966)
E/SurfaceView( 9477): 	at android.view.Choreographer.doCallbacks(Choreographer.java:790)
E/SurfaceView( 9477): 	at android.view.Choreographer.doFrame(Choreographer.java:725)
E/SurfaceView( 9477): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:951)
E/SurfaceView( 9477): 	at android.os.Handler.handleCallback(Handler.java:883)
E/SurfaceView( 9477): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/SurfaceView( 9477): 	at android.os.Looper.loop(Looper.java:214)
E/SurfaceView( 9477): 	at android.app.ActivityThread.main(ActivityThread.java:7356)
E/SurfaceView( 9477): 	at java.lang.reflect.Method.invoke(Native Method)
E/SurfaceView( 9477): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/SurfaceView( 9477): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
D/EGL_emulation( 9477): eglMakeCurrent: 0xddc1a0c0: ver 2 0 (tinfo 0xddc0f720)
D/EGL_emulation( 9477): eglMakeCurrent: 0xddc1a0c0: ver 2 0 (tinfo 0xddc0f720)
D/EGL_emulation( 9477): eglMakeCurrent: 0xddc1a0c0: ver 2 0 (tinfo 0xddc0f720)

Camera does not work on Android Tablet with android-arm64 β€’ Android 9 (API 28)

Google pixel works, but tablet does not work

E/flutter (16778): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Invalid argument(s) (path): Must not be null
E/flutter (16778): #0      ArgumentError.checkNotNull (dart:core/errors.dart:194:27)
E/flutter (16778): #1      _File._checkNotNull (dart:io/file_impl.dart:641:19)
E/flutter (16778): #2      new _File (dart:io/file_impl.dart:205:17)
E/flutter (16778): #3      new File (dart:io/file.dart:250:18)
E/flutter (16778): #4      DFcamera.getImage (package:sources/dfcamera/dfcamera.dart:48:19)
E/flutter (16778): <asynchronous suspension>
E/flutter (16778): #5      _SendPageState._openCamera (package:sources/dfsources.dart:86:22)
E/flutter (16778): #6      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:993:19)
E/flutter (16778): #7      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1111:38)
E/flutter (16778): #8      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:183:24)
E/flutter (16778): #9      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:598:11)
E/flutter (16778): #10     BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:287:5)
E/flutter (16778): #11     BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:222:7)
E/flutter (16778): #12     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:476:9)
E/flutter (16778): #13     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:77:12)
E/flutter (16778): #14     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:122:9)
E/flutter (16778): #15     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter (16778): #16     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:120:18)
E/flutter (16778): #17     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:106:7)
E/flutter (16778): #18     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:358:19)
E/flutter (16778): #19     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:338:22)
E/flutter (16778): #20     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:267:11)
E/flutter (16778): #21     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:295:7)
E/flutter (16778): #22     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:240:7)
E/flutter (16778): #23     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:213:7)
E/flutter (16778): #24     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (16778): #25     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (16778): #26     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (16778): #27     _invoke1 (dart:ui/hooks.dart:265:10)
E/flutter (16778): #28     _dispatchPointerDataPacket (dart:ui/hooks.dart:174:5)
E/flutter (16778): 
I/ScanPresenter(16778): camera null

androidtablet-issue

I don't know why I get this

Hi, I get this when I'm debugging and I don't really know what it is

I/etectionexample( 2931): type=1400 audit(0.0:6353): avc: denied { connectto } for path="/dev/socket/fwmarkd" scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:init:s0 tclass=unix_stream_socket permissive=1
I/etectionexample( 2931): type=1400 audit(0.0:6354): avc: denied { write } for name="example" dev="sdb3" ino=91026 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0:c512,c768 tclass=dir permissive=1
I/etectionexample( 2931): type=1400 audit(0.0:6355): avc: denied { add_name } for name="build" scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0:c512,c768 tclass=dir permissive=1
I/etectionexample( 2931): type=1400 audit(0.0:6356): avc: denied { create } for name="build" scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0:c512,c768 tclass=dir permissive=1
I/etectionexample( 2931): type=1400 audit(0.0:6359): avc: denied { create } for name="LICENSE" scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0:c512,c768 tclass=file permissive=1
I/etectionexample( 2931): type=1400 audit(0.0:6360): avc: denied { write open } for path="/data/data/com.sample.edgedetectionexample/code_cache/exampleXHTZNW/example/build/flutter_assets/LICENSE" dev="sdb3" ino=91030 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0:c512,c768 tclass=file permissive=1
D/OpenCV/StaticHelper( 2931): Trying to get library list
E/OpenCV/StaticHelper( 2931): OpenCV error: Cannot load info library for OpenCV
D/OpenCV/StaticHelper( 2931): Library list: ""
D/OpenCV/StaticHelper( 2931): First attempt to load libs
D/OpenCV/StaticHelper( 2931): Trying to init OpenCV libs
D/OpenCV/StaticHelper( 2931): Trying to load library opencv_java3
D/OpenCV/StaticHelper( 2931): Cannot load library "opencv_java3"
W/System.err( 2931): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sample.edgedetectionexample-8YSfnzQZjMlgAIhGsiNrXA==/base.apk"],nativeLibraryDirectories=[/data/app/com.sample.edgedetectionexample-8YSfnzQZjMlgAIhGsiNrXA==/lib/x86, /data/app/com.sample.edgedetectionexample-8YSfnzQZjMlgAIhGsiNrXA==/base.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libopencv_java3.so"

W/System.err( 2931): 	at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
W/System.err( 2931): 	at java.lang.System.loadLibrary(System.java:1657)
W/System.err( 2931): 	at org.opencv.android.StaticHelper.loadLibrary(StaticHelper.java:64)
W/System.err( 2931): 	at org.opencv.android.StaticHelper.initOpenCVLibs(StaticHelper.java:95)
W/System.err( 2931): 	at org.opencv.android.StaticHelper.initOpenCV(StaticHelper.java:39)
W/System.err( 2931): 	at org.opencv.android.OpenCVLoader.initDebug(OpenCVLoader.java:102)
W/System.err( 2931): 	at com.sample.edgedetection.scan.ScanActivity.prepare(ScanActivity.kt:37)
W/System.err( 2931): 	at com.sample.edgedetection.base.BaseActivity.onCreate(BaseActivity.kt:16)
W/System.err( 2931): 	at android.app.Activity.performCreate(Activity.java:6975)
W/System.err( 2931): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
W/System.err( 2931): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
W/System.err( 2931): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
W/System.err( 2931): 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
W/System.err( 2931): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
W/System.err( 2931): 	at android.os.Handler.dispatchMessage(Handler.java:105)
W/System.err( 2931): 	at android.os.Looper.loop(Looper.java:164)
W/System.err( 2931): 	at android.app.ActivityThread.main(ActivityThread.java:6541)
W/System.err( 2931): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 2931): 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
W/System.err( 2931): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
D/OpenCV/StaticHelper( 2931): First attempt to load libs fails
I/ScanActivity( 2931): loading opencv error, exit

This does not let me use the library. I hope you can help me

MissingPluginException(No implementation found for method edge_detect on channel edge_detection)

Hello
we are getting MissingPluginException when we execute below given code

try { imagePath = await EdgeDetection.detectEdge; } on PlatformException catch (e) { print(e.toString()); } on Exception catch (e) { print(e.toString()); }

we added entry of edge_detection library into pubspec.yml file as given below

edge_detection: ^1.0.4
one thing we noticed that when we add this file_picker: ^1.3.8 file_picker library with edge_detection then its throwing above exception. we unable to rectify this issue why its stoped working. so please help me out

Thanks

loading opencv error

I do the similar to the example but it pulls out error:

I/Choreographer( 3440): Skipped 68 frames!  The application may be doing too much work on its main thread.
W/art     ( 3440): Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/art     ( 3440): Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
I/art     ( 3440):   at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2559)
I/art     ( 3440):   at void androidx.appcompat.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62)
I/art     ( 3440):   at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
I/art     ( 3440):   at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
I/art     ( 3440):   at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
I/art     ( 3440):   at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
I/art     ( 3440):   at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607)
I/art     ( 3440):   at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
I/art     ( 3440):   at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466)
I/art     ( 3440):   at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
I/art     ( 3440):   at void com.sample.edgedetection.base.BaseActivity.onCreate(android.os.Bundle) (BaseActivity.kt:13)
I/art     ( 3440):   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6662)
I/art     ( 3440):   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118)
I/art     ( 3440):   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2599)
I/art     ( 3440):   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2707)
I/art     ( 3440):   at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
I/art     ( 3440):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1460)
I/art     ( 3440):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
I/art     ( 3440):   at void android.os.Looper.loop() (Looper.java:154)
I/art     ( 3440):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6077)
I/art     ( 3440):   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/art     ( 3440):   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:866)
I/art     ( 3440):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:756)
I/art     ( 3440): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.tekree.scann-1/base.apk"],nativeLibraryDirectories=[/data/app/com.tekree.scann-1/lib/x86, /data/app/com.tekree.scann-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]
I/art     ( 3440):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
I/art     ( 3440):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
I/art     ( 3440):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/art     ( 3440):   at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2559)
I/art     ( 3440):   at void androidx.appcompat.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62)
I/art     ( 3440):   at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
I/art     ( 3440):   at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
I/art     ( 3440):   at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
I/art     ( 3440):   at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
I/art     ( 3440):   at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
I/art     ( 3440):   at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607)
I/art     ( 3440):   at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
I/art     ( 3440):   at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466)
I/art     ( 3440):   at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
I/art     ( 3440):   at void com.sample.edgedetection.base.BaseActivity.onCreate(android.os.Bundle) (BaseActivity.kt:13)
I/art     ( 3440):   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6662)
I/art     ( 3440):   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118)
I/art     ( 3440):   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2599)
I/art     ( 3440):   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2707)
I/art     ( 3440):   at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
I/art     ( 3440):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1460)
I/art     ( 3440):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
I/art     ( 3440):   at void android.os.Looper.loop() (Looper.java:154)
I/art     ( 3440):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6077)
I/art     ( 3440):   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/art     ( 3440):   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:866)
I/art     ( 3440):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:756)
I/art     ( 3440): 
D/OpenCV/StaticHelper( 3440): Trying to get library list
E/OpenCV/StaticHelper( 3440): OpenCV error: Cannot load info library for OpenCV
D/OpenCV/StaticHelper( 3440): Library list: ""
D/OpenCV/StaticHelper( 3440): First attempt to load libs
D/OpenCV/StaticHelper( 3440): Trying to init OpenCV libs
D/OpenCV/StaticHelper( 3440): Trying to load library opencv_java3
D/OpenCV/StaticHelper( 3440): Cannot load library "opencv_java3"
W/System.err( 3440): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.tekree.scann-1/base.apk"],nativeLibraryDirectories=[/data/app/com.tekree.scann-1/lib/x86, /data/app/com.tekree.scann-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libopencv_java3.so"
W/System.err( 3440): 	at java.lang.Runtime.loadLibrary0(Runtime.java:972)
W/System.err( 3440): 	at java.lang.System.loadLibrary(System.java:1530)
W/System.err( 3440): 	at org.opencv.android.StaticHelper.loadLibrary(StaticHelper.java:64)
W/System.err( 3440): 	at org.opencv.android.StaticHelper.initOpenCVLibs(StaticHelper.java:95)
W/System.err( 3440): 	at org.opencv.android.StaticHelper.initOpenCV(StaticHelper.java:39)
W/System.err( 3440): 	at org.opencv.android.OpenCVLoader.initDebug(OpenCVLoader.java:102)
W/System.err( 3440): 	at com.sample.edgedetection.scan.ScanActivity.prepare(ScanActivity.kt:36)
W/System.err( 3440): 	at com.sample.edgedetection.base.BaseActivity.onCreate(BaseActivity.kt:16)
W/System.err( 3440): 	at android.app.Activity.performCreate(Activity.java:6662)
W/System.err( 3440): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
W/System.err( 3440): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
W/System.err( 3440): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
W/System.err( 3440): 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
W/System.err( 3440): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
W/System.err( 3440): 	at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 3440): 	at android.os.Looper.loop(Looper.java:154)
W/System.err( 3440): 	at android.app.ActivityThread.main(ActivityThread.java:6077)
W/System.err( 3440): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 3440): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
W/System.err( 3440): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
D/OpenCV/StaticHelper( 3440): First attempt to load libs fails
I/ScanActivity( 3440): loading opencv error, exit

AndroidX compatibility

Hi Sawan, thanks for the nice work. Do you think it is possible to update the plugin to androidx compatibility?

Android example not work

On ios work fine, on android I et this error running the example project

` at org.jetbrains.kotlin.codegen.FunctionGenerationStrategy$FunctionDefault.doGenerateBody(FunctionGenerationStrategy.java:58)
at org.jetbrains.kotlin.codegen.FunctionGenerationStrategy$CodegenBased.generateBody(FunctionGenerationStrategy.java:78)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethodBody(FunctionCodegen.java:569)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethodBody(FunctionCodegen.java:332)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:298)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:176)
at org.jetbrains.kotlin.codegen.FunctionCodegen.gen(FunctionCodegen.java:147)
at org.jetbrains.kotlin.codegen.MemberCodegen.genSimpleMember(MemberCodegen.java:210)
at org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateDeclaration(ClassBodyCodegen.java:168)
at org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateBody(ClassBodyCodegen.java:84)
at org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:142)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:316)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:300)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateClassOrObject(PackageCodegenImpl.java:157)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateClassesAndObjectsInFile(PackageCodegenImpl.java:86)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateFile(PackageCodegenImpl.java:119)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generate(PackageCodegenImpl.java:66)
... 44 more

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':edge_detection:compileDebugKotlin'.

Internal compiler error. See log for more details

  • 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 37s
Gradle task assembleDebug failed with exit code 1`

The apk size is large when is forked

Hi, I forked this repo for do some changes of color, assets, etc.
But when I added my repo to the pubspec.yaml file and build the apk, the size was around 100MB
then I deleted jniLibs\x86 and jniLibs\x86_64 folders and the size reduce considerably to 50MB.

What another folder is necesary delete for final release?

ENOENT file not found error on Android 11 emulator

Hi, when I run the example code on an emulator using Android 11, as soon as the save button is pressed, the app crashes, giving this error log:

E/CropActivity( 8333): Saved touched!
D/AndroidRuntime( 8333): Shutting down VM
E/AndroidRuntime( 8333): FATAL EXCEPTION: main
E/AndroidRuntime( 8333): Process: com.example.edge_detection_test, PID: 8333
E/AndroidRuntime( 8333): java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 8333): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/AndroidRuntime( 8333): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime( 8333): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 8333): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8333): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime( 8333): ... 1 more
E/AndroidRuntime( 8333): Caused by: java.io.FileNotFoundException: /storage/emulated/0/smart_scanner/crop_958.jpeg: open failed: ENOENT (No such file or directory)
E/AndroidRuntime( 8333): at libcore.io.IoBridge.open(IoBridge.java:492)
E/AndroidRuntime( 8333): at java.io.FileOutputStream.(FileOutputStream.java:236)
E/AndroidRuntime( 8333): at java.io.FileOutputStream.(FileOutputStream.java:186)
E/AndroidRuntime( 8333): at com.sample.edgedetection.crop.CropPresenter.save(CropPresenter.kt:217)
E/AndroidRuntime( 8333): at com.sample.edgedetection.crop.CropActivity.onOptionsItemSelected(CropActivity.kt:78)
E/AndroidRuntime( 8333): at android.app.Activity.onMenuItemSelected(Activity.java:4269)
E/AndroidRuntime( 8333): at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:384)
E/AndroidRuntime( 8333): at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196)
E/AndroidRuntime( 8333): at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
E/AndroidRuntime( 8333): at androidx.appcompat.app.AppCompatDelegateImpl.onMenuItemSelected(AppCompatDelegateImpl.java:888)
E/AndroidRuntime( 8333): at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
E/AndroidRuntime( 8333): at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
E/AndroidRuntime( 8333): at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
E/AndroidRuntime( 8333): at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981)
E/AndroidRuntime( 8333): at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
E/AndroidRuntime( 8333): at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
E/AndroidRuntime( 8333): at android.view.View.performClick(View.java:7448)
E/AndroidRuntime( 8333): at android.view.View.performClickInternal(View.java:7425)
E/AndroidRuntime( 8333): at android.view.View.access$3600(View.java:810)
E/AndroidRuntime( 8333): at android.view.View$PerformClick.run(View.java:28305)
E/AndroidRuntime( 8333): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 8333): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8333): at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime( 8333): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime( 8333): ... 3 more
E/AndroidRuntime( 8333): Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
E/AndroidRuntime( 8333): at libcore.io.Linux.open(Native Method)
E/AndroidRuntime( 8333): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
E/AndroidRuntime( 8333): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
E/AndroidRuntime( 8333): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
E/AndroidRuntime( 8333): at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
E/AndroidRuntime( 8333): at libcore.io.IoBridge.open(IoBridge.java:478)
E/AndroidRuntime( 8333): ... 26 more
I/Process ( 8333): Sending signal. PID: 8333 SIG: 9

I've tried including:


in the AndroidManifest file, but that doesn't work either.

Does anyone know where the issue lies and how I can fix this? Any help would be much appreciated.

Please, update pub.dev

Now the version in pub.dev has bugs according to FileNotFound exception and migration to Android V2

Add some features

Hello,

Can you add when detect paper then automatically crop images? Like gunnies scan ?

App crashes frequently using edge detection

Fatal Exception: java.lang.RuntimeException
takePicture failed

android.hardware.Camera.native_takePicture (Camera.java)
android.hardware.Camera.takePicture (Camera.java:1564)
android.hardware.Camera.takePicture (Camera.java:1506)
com.sample.edgedetection.scan.ScanPresenter$shut$1.onAutoFocus (ScanPresenter.kt:67)
android.hardware.Camera$EventHandler.handleMessage (Camera.java:1238)
android.os.Handler.dispatchMessage (Handler.java:107)
android.os.Looper.loop (Looper.java:237)
android.app.ActivityThread.main (ActivityThread.java:7860)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1075)

AndroidX Support

is there any way I can migrate this plugin to AndroidX? getting a lot of problems after installing the plugin.

Error building IOS app

[!] CocoaPods could not find compatible versions for pod "edge_detection":
In Podfile:
edge_detection (from .symlinks/plugins/edge_detection/ios)
Specs satisfying the edge_detection (from .symlinks/plugins/edge_detection/ios) dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in raise_error_unless_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in tap' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in attempt_to_activate' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in resolve' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:94:in `resolve'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.