Launching libmain.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1/lib/src/interface/local_platform.dart:45:41: Error: Member not found: 'packageRoot'.
String get packageRoot => io.Platform.packageRoot;
^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'C:srcflutterpackagesflutter_toolsgradleflutter.gradle' line: 1102
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:srcflutterbinflutter.bat'' finished with non-zero exit value 1
* 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 28s
Exception: Gradle task assembleDebug failed with exit code 1
I received this error when I tried to run my flutter app on an emulator in android-studio. How do I solve this issue?
2
Answers
It worked but by using
dependencies:
Platform.packageRoot member variable now has been removed in the platform
plugin. All you need to do is override dependency to the previous version.