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

Not compatible with flutter_test #25

Closed
akaenner opened this issue May 29, 2020 · 5 comments
Closed

Not compatible with flutter_test #25

akaenner opened this issue May 29, 2020 · 5 comments
Assignees

Comments

@akaenner
Copy link

If I include excel in my project I get the following dependency error:

[MyApp] flutter pub get
Running "flutter pub get" in MyApp...
Because every version of flutter_test from sdk depends on xml 3.6.1 and excel >=1.0.4 depends on xml ^4.1.0, flutter_test from sdk is incompatible with excel >=1.0.4.
So, because Herein depends on both excel ^1.0.8 and flutter_test any from sdk, version solving failed.

pub get failed (1; So, because MyApp depends on both excel ^1.0.8 and flutter_test any from sdk, version solving failed.)
exit code 1

What should I do? I need both: tests and excel.

@justkawal
Copy link
Owner

Use command : flutter update-packages --force-upgrade

Tell me if this works for you !

~Thank You
LONG LIVE OPEN S🔥URCE

@akaenner
Copy link
Author

Now I get a slightly different dependency error. Basically the same but the required version for flutter_test is now 3.7.0:

Because every version of flutter_test from sdk depends on xml 3.7.0 and excel >=1.0.4 depends on xml ^4.1.0, flutter_test from sdk is incompatible with excel >=1.0.4.

Here is my flutter doctor output:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.2, on Mac OS X 10.15.4 19E287, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.45.1)
[✓] Connected device (2 available)

• No issues found!

@justkawal
Copy link
Owner

justkawal commented May 30, 2020

Solved

Try below steps:

  1. Open project folder and remove excel dependency
  2. Add these lines in your project's pubspec.yaml
dependency_overrides:
  xml: ^4.1.0

after adding it will look like:

dev_dependencies:
  flutter_test:
    sdk: flutter

dependency_overrides:
  xml: ^4.1.0
  1. run flutter clean in the project folder.

  2. Close project folder

  3. Open terminal and run below commands :

    flutter upgrade

    pub cache repair

    flutter update-packages --force-upgrade

  4. Open project folder and add the dependency `excel:

Tell me if this works ?

We celebrate every issue as it helps us to improve.
~Thank You
LONG LIVE OPEN S🔥URCE

@justkawal justkawal self-assigned this May 30, 2020
@akaenner
Copy link
Author

Thank you very much. This works :-)

@justkawal
Copy link
Owner

Happy to help.
Stay Tuned...

More functionality is coming within next week with excel being more faster than now.

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