Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Crashes on Android #73

Open
EmreTuran99 opened this issue Dec 1, 2023 · 2 comments
Open

Crashes on Android #73

EmreTuran99 opened this issue Dec 1, 2023 · 2 comments

Comments

@EmreTuran99
Copy link

EmreTuran99 commented Dec 1, 2023

App crashes on Android when trying to call await CardScanner.scanCard(scanOptions: scanOptions) method.

Flutter (Channel stable, 3.13.9, on macOS 14.1.1 23B81 darwin-arm64, locale en-TR)
credit_card_scanner: ^1.0.5

Tested devices:
- Samsung Galaxy S10+ (Android 12, One UI 4.1)
- Pixel 4 XL Emulator (Android Tiramisu Preview - API Tiramisu)

Traceback log:

D/AndroidRuntime(25664): Shutting down VM
E/AndroidRuntime(25664): FATAL EXCEPTION: main
E/AndroidRuntime(25664): Process: com.., PID: 25664
E/AndroidRuntime(25664): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/mlkit/vision/common/internal/Detector;
E/AndroidRuntime(25664): at java.lang.Class.newInstance(Native Method)
E/AndroidRuntime(25664): at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
E/AndroidRuntime(25664): at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
E/AndroidRuntime(25664): at android.app.Instrumentation.newActivity(Instrumentation.java:1273)
E/AndroidRuntime(25664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3901)
E/AndroidRuntime(25664): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4201)
E/AndroidRuntime(25664): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
E/AndroidRuntime(25664): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(25664): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(25664): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438)
E/AndroidRuntime(25664): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(25664): at android.os.Looper.loopOnce(Looper.java:226)
E/AndroidRuntime(25664): at android.os.Looper.loop(Looper.java:313)
E/AndroidRuntime(25664): at android.app.ActivityThread.main(ActivityThread.java:8663)
E/AndroidRuntime(25664): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25664): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
E/AndroidRuntime(25664): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
E/AndroidRuntime(25664): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.mlkit.vision.common.internal.Detector" on path: DexPathList[[zip file "/data/app/~~W3cVXOG3EOplu7FOIcHGCA==/com..-oA7et_FXCG6FbV1alArekA==/base.apk"],nativeLibraryDirectories=[/data/app/~~W3cVXOG3EOplu7FOIcHGCA==/com..-oA7et_FXCG6FbV1alArekA==/lib/arm64, /data/app/~~W3cVXOG3EOplu7FOIcHGCA==/com..-oA7et_FXCG6FbV1alArekA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64]]
E/AndroidRuntime(25664): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
E/AndroidRuntime(25664): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(25664): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(25664): ... 17 more
D/Camera2CameraImpl(25664): {Camera@659f424[id=0]} Resetting Capture Session
D/Camera2CameraImpl(25664): {Camera@659f424[id=0]} Releasing session in state INITIALIZED
D/Camera2CameraImpl(25664): {Camera@659f424[id=0]} Attempting to force open the camera.
D/CameraStateRegistry(25664): tryOpenCamera(Camera@659f424[id=0]) [Available Cameras: 1, Already Open: false (Previous state: null)] --> SUCCESS
D/CameraStateRegistry(25664): Recalculating open cameras:
D/CameraStateRegistry(25664): Camera State
D/CameraStateRegistry(25664): -------------------------------------------------------------------
D/CameraStateRegistry(25664): Camera@39e069f[id=3] UNKNOWN
D/CameraStateRegistry(25664): Camera@e622f45[id=1] UNKNOWN
D/CameraStateRegistry(25664): Camera@bfb89a7[id=2] UNKNOWN
D/CameraStateRegistry(25664): Camera@659f424[id=0] OPENING
D/CameraStateRegistry(25664): -------------------------------------------------------------------
D/CameraStateRegistry(25664): Open count: 1 (Max allowed: 1)
D/Camera2CameraImpl(25664): {Camera@659f424[id=0]} Opening camera.
D/Camera2CameraImpl(25664): {Camera@659f424[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING
I/Process (25664): Sending signal. PID: 25664 SIG: 9
Lost connection to device.

@aneeshdevala
Copy link

hey EmreTuran99 are u solved this issue? please reply me

@MIR-FAHIM
Copy link

app is crashing while opening the camera.

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

No branches or pull requests

3 participants