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

Error in build after Flutter update on 4.2.2020 #10

Closed
selecky opened this issue Feb 4, 2020 · 4 comments
Closed

Error in build after Flutter update on 4.2.2020 #10

selecky opened this issue Feb 4, 2020 · 4 comments

Comments

@selecky
Copy link

selecky commented Feb 4, 2020

After I ran flutter update, Im unable to build my app.

Compiler message:
../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/get-1.7.4/lib/src/snack_route.dart:279:8: Error: The method 'SnackRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.
void install(OverlayEntry insertionPoint) {
^
/C:/Flutter/SDK/flutter/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').
void install() {
^
../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/get-1.7.4/lib/src/snack_route.dart:289:18: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
super.install(insertionPoint);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Flutter\SDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 803

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\Flutter\SDK\flutter\bin\flutter.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 19s
Finished with error: Gradle task assembleDebug failed with exit code 1

@jonataslaw
Copy link
Owner

jonataslaw commented Feb 4, 2020

After I ran flutter update, Im unable to build my app.

Compiler message:
../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/get-1.7.4/lib/src/snack_route.dart:279:8: Error: The method 'SnackRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.
void install(OverlayEntry insertionPoint) {
^
/C:/Flutter/SDK/flutter/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').
void install() {
^
../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/get-1.7.4/lib/src/snack_route.dart:289:18: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
super.install(insertionPoint);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Flutter\SDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 803
  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\Flutter\SDK\flutter\bin\flutter.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 19s
Finished with error: Gradle task assembleDebug failed with exit code 1

Hi, thanks for reporting this error. I could not reproduce it, could you tell me which version/branch of Flutter you are using?

@selecky
Copy link
Author

selecky commented Feb 5, 2020

Hi, here is the flutter doctor -v result:

[√] Flutter (Channel master, v1.14.7-pre.118, on Microsoft Windows [Version 10.0.17763.973], locale en-GB)
• Flutter version 1.14.7-pre.118 at C:\Flutter\SDK\flutter
• Framework revision 94c7e823be (3 minutes ago), 2020-02-05 08:00:32 +0100
• Engine revision 81dffd1241
• Dart version 2.8.0 (build 2.8.0-dev.7.0 c8ed304e97)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\tomse\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Connected device (3 available)
• AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• Chrome • chrome • web-javascript • Google Chrome 79.0.3945.130
• Web Server • web-server • web-javascript • Flutter Tools

• No issues found!

@jonataslaw
Copy link
Owner

Hi, here is the flutter doctor -v result:

[√] Flutter (Channel master, v1.14.7-pre.118, on Microsoft Windows [Version 10.0.17763.973], locale en-GB)
• Flutter version 1.14.7-pre.118 at C:\Flutter\SDK\flutter
• Framework revision 94c7e823be (3 minutes ago), 2020-02-05 08:00:32 +0100
• Engine revision 81dffd1241
• Dart version 2.8.0 (build 2.8.0-dev.7.0 c8ed304e97)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\tomse\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Connected device (3 available)
• AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• Chrome • chrome • web-javascript • Google Chrome 79.0.3945.130
• Web Server • web-server • web-javascript • Flutter Tools

• No issues found!

Hi, I switched to the dev branch to try to reproduce, and I don't have any errors. If you are using the master, it has changed a lot, because they are trying to rebuild the overlayRoute, but only for informational purposes, the change that caused the error was reversed in the master, so updating Flutter again will do the job.

I created a PR in the Framework to fix the route reconstruction problem that is fixed in Get, and they are doing tests on the master with the solution. If she enters the Dev, it means that I will be able to remove the OverlayRoute from Get and use the normal route, and the error is due to this, the normal OverlayRoute will no longer need the parameter I use to prevent unnecessary reconstructions.

If they decide to go on with OverlayEntry again off the stage, I will create a dev branch for this plugin so that anyone using the dev branch does not face any problems.

@selecky
Copy link
Author

selecky commented Feb 6, 2020

You are right. Its working again.
Thanks!

jonataslaw pushed a commit that referenced this issue Nov 9, 2020
kamazoun added a commit to kamazoundevz/getx that referenced this issue Jan 17, 2021
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

2 participants