AmolGangadhare / flutter_barcode_scanner

Barcode scanner plugin for flutter. Supports barcode scanning for Android and iOS
https://pub.dev/packages/flutter_barcode_scanner
MIT License
380 stars 499 forks source link

A Quick Fix for "FlutterEngine" call issue #71

Closed dhruvilp closed 4 years ago

dhruvilp commented 4 years ago

PROBLEM Flutter no longer calls a new FlutterEngine on onCreate() which causes a crash after APK build.

SOLUTION Go to ==> flutter_barcode_scanner/example/android/app/src/main/java/com/amolg/flutterbarcodescannerexample/EmbeddingV1Activity.java

and REPLACE following


import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant

class EmbeddingV1Activity: FlutterActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        GeneratedPluginRegistrant.registerWith(this)
    }
}
AmolGangadhare commented 4 years ago

@dhruvilp

Thanks for reporting the issue.

This migration is already done. It will be available in next release.

Thanks

ghost commented 4 years ago

Hello,

Is there a way to fix this temporarily until your next release is available? I don't really follow dhruvilp's comment so I don't know how to fix it myself as I'm not a Java guy.

Thank you, Michael

AmolGangadhare commented 4 years ago

@MysthawkCanada

Please follow https://github.com/AmolGangadhare/flutter_barcode_scanner/issues/60#issuecomment-575516231

ghost commented 4 years ago

@AmolGangadhare

Perfect, thank you!

dhruvilp commented 4 years ago

@dhruvilp

Thanks for reporting the issue.

This migration is already done. It will be available in next release.

Thanks

Thanks, Amol for getting back!

AmolGangadhare commented 4 years ago

V1.0.0 has been released

Closing this