Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Unable to build with Flutter 2.2.2 #37

@mirryi

Description

@mirryi

I'm unable to build the application on Flutter version 2.2.2. This is my first time working with Flutter, so I could be doing something wrong.

flutter pub get isn't able to resolve dependencies due to a conflict in dependency requirements between image and integration_test:

Running "flutter pub get" in xkcdviewer_...
Because every version of integration_test from sdk depends on archive 3.1.2 and image 2.1.19 depends on archive ^2.0.0, integration_test from sdk is incompatible with image 2.1.19.

And because no versions of image match >2.1.19 <3.0.0, integration_test from sdk is incompatible with image ^2.1.19.

So, because xkcd depends on both image ^2.1.19 and integration_test any from sdk, version solving failed.
pub get failed (1; So, because xkcd depends on both image ^2.1.19 and integration_test any from sdk, version solving
failed.)

Upgrading image to the latest version, 3.0.2 seems to resolve this, but there are tons of build errors after that: https://hastebin.com/raw/onaciwixut

flutter pub upgrade seems to fix everything, except an error in dynamic_theme:

Running Gradle task 'assembleRelease'...
Picked up _JAVA_OPTIONS: -Djava.util.prefs.userRoot="/home/dophin2009/.config"/java

../../../.cache/flutter/pub-cache/hosted/pub.dartlang.org/dynamic_theme-1.0.1/lib/dynamic_theme.dart:25:46: Error: Method not found: 'TypeMatcher'.

    return context.ancestorStateOfType(const TypeMatcher<DynamicThemeState>());

                                             ^^^^^^^^^^^

../../../.cache/flutter/pub-cache/hosted/pub.dartlang.org/dynamic_theme-1.0.1/lib/dynamic_theme.dart:25:20: Error: The method 'ancestorStateOfType' isn't defined for the class 'BuildContext'.

 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/opt/flutter/packages/flutter/lib/src/widgets/framework.dart').

Try correcting the name to the name of an existing method, or defining a method named 'ancestorStateOfType'.

    return context.ancestorStateOfType(const TypeMatcher<DynamicThemeState>());

                   ^^^^^^^^^^^^^^^^^^^





FAILURE: Build failed with an exception.



* Where:

Script '/opt/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1035



* What went wrong:

Execution failed for task ':app:compileFlutterBuildRelease'.

> Process 'command '/opt/flutter/bin/flutter'' 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 31s
Running Gradle task 'assembleRelease'...                           32.2s
Gradle task assembleRelease failed with exit code 1

This seems to be related to dynamic_theme #52? There is an unmerged PR that addresses this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions