Closed Gunlek closed 4 years ago
Fixed by updating Flutter to current latest version
Having same error, already run flutter upgrade
but still, any other suggestion ?
What's the flutter channel you're using ? Upgrading to stable channel solved the issue for me
I am facing the same problem.. I have the latest version of flutter. any solution?
I am using 1.22.5 stable channel (macOS).
Here are the errors that I am getting,
/Users/mr22726/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-1.0.1/android/src/main/java/com/amolg/flutterbarcodescanner/FlutterBarcodeScannerPlugin.java:33: error: cannot find symbol
import io.flutter.embedding.engine.plugins.lifecycle.FlutterLifecycleAdapter;
^
symbol: class FlutterLifecycleAdapter
location: package io.flutter.embedding.engine.plugins.lifecycle
/Users/mr22726/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-1.0.1/android/src/main/java/com/amolg/flutterbarcodescanner/FlutterBarcodeScannerPlugin.java:266: error: cannot find symbol
lifecycle = FlutterLifecycleAdapter.getActivityLifecycle(activityBinding);
^
symbol: variable FlutterLifecycleAdapter
location: class FlutterBarcodeScannerPlugin
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_barcode_scanner:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for 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 2s
Exception: Gradle task assembleDebug failed with exit code 1
I have latest flutter version but still facing this issue, unable to build apk. Any solution??
Describe the bug While trying to build the app using the 'flutter build apk --split-per-abi' command, the console raises various java exceptions
To Reproduce Steps to reproduce the behavior:
Expected behavior Should build correctly without errors
Logs
Smartphone (please complete the following information): Tested in emulator, worked correctly, not plateform dependent as it's the build step that goes wrong
Additional context The app were perfectly working in emulator or on any real device in debug mode few days ago, that's probably due to a flutter update ?