flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

flutter_test any from sdk which doesn't exist (the Flutter SDK is not available), version solving failed. Flutter users should run `flutter pub get` instead of `pub get`.

Open ghost opened this issue 5 years ago • 36 comments

@Balajiomsakthi commented on Aug 22, 2019, 8:29 AM UTC:

Hi, I tried to delete the bin/cache/ directory in my flutter. After that I am facing this issue. I can't able to run my app or start or stop.

Screenshot 1941-05-31 at 13 57 52

This issue was moved by DanTup from Dart-Code/Dart-Code#1939.

ghost avatar Aug 22 '19 08:08 ghost

@DanTup commented on Aug 22, 2019, 8:32 AM UTC:

This repository is for the VS Code extension, but this looks like an IntelliJ issue. It seems like something is running pub get that should be running flutter packages get, but I don't know enough about the IntelliJ plugin to know why that is.

I'll move this to the other repo where someone may be able to investigate.

/move flutter/flutter-intellij

ghost avatar Aug 22 '19 08:08 ghost

@Balajiomsakthi

Bit of a stab in the dark, but

I tried to delete the bin/cache/ directory in my flutter.

I wonder if Flutter's Dart SDK is missing so it's falling back to a non-Flutter version. Try closing IntelliJ and running flutter doctor from the terminal, which should cause it to download the Dart SDK if it's missing, then try opening IntelliJ again.

DanTup avatar Aug 22 '19 08:08 DanTup

@DanTup
Oh No!... Tried but still facing same issue. No improvement.

balajiks-dev avatar Aug 22 '19 08:08 balajiks-dev

Just Holding this project and created a new project and doing. Kindly tell me if any other possible solutions are there.

balajiks-dev avatar Aug 22 '19 12:08 balajiks-dev

I think @DanTup is on to something here. In Preferences, under Languages & Frameworks, is there a Flutter SDK set for the project?

pq avatar Aug 22 '19 14:08 pq

@pq Yes! I set Flutter SDK also. And even my app is working properly but suddenly facing this issue.

balajiks-dev avatar Aug 23 '19 04:08 balajiks-dev

In case if your error is exactly the same as given above in the title. Follow these steps:-

1.Press [ Ctrl + Alt + S ] to open settings. 2.Open Languages and Frameworks. 3. Select Flutter. 4. You will see a Flutter SDK path empty. Provide the location for your flutter SDK where you've downloaded your flutter from the web.

After that try again clicking get dependencies and your error must be solved.

utkarshpateriya avatar Dec 10 '19 17:12 utkarshpateriya

Same isue on the Github Action: image

adriens avatar Dec 12 '19 09:12 adriens

@adriens how are you setting the Flutter SDK up on GH Actions? This would happen if you only have a standard Dart SDK?

DanTup avatar Dec 12 '19 10:12 DanTup

Hi @DanTup thanks for your answer. I did only click on the action and let the action run all by default. What should I look at to customize it ? 🙏

adriens avatar Dec 13 '19 20:12 adriens

You need an action that can set up Flutter. I've been working on one I use for the VS Code extension's integration tests that you're welcome to use on the understanding it's unofficial and support is not guaranteed (of course you could also fork the code from my gh-actions repo):

https://github.com/Dart-Code/Dart-Code/blob/09450d0a2f522ea80d84498c328eba6ed2b8cf94/.github/workflows/build-and-test.yml#L50-L55

You may wish to change @master in the action to a tagged version if you don't want it changing (I use master here since I control both the action and this code, so it was easier to iterate if it always used the latest version of the action).

You'd also want to remove the if property (this is to avoid setting up Flutter for non-Flutter tests for Dart-Code) and can remove the id property if you don't need to reference it elsewhere. You can also remove with:/channel: or customise it (it defaults to stable).

DanTup avatar Dec 16 '19 10:12 DanTup

Best Method !

This method helped me. Got to languages and frameworks, select flutter from that, add the flutter sdk path again, apply, come back and try upgrading the dependencies

Aravind1444 avatar Feb 13 '20 18:02 Aravind1444

In case if your error is exactly the same as given above in the title. Follow these steps:-

1.Press [ Ctrl + Alt + S ] to open settings. 2.Open Languages and Frameworks. 3. Select Flutter. 4. You will see a Flutter SDK path empty. Provide the location for your flutter SDK where you've downloaded your flutter from the web.

After that try again clicking get dependencies and your error must be solved.

Thanks a lot!

asapvondope avatar Mar 29 '20 15:03 asapvondope

Same isue on the Github Action: image

Did someone got a fix for this?

akilawickey avatar Mar 31 '20 19:03 akilawickey

flutter pub get got following error in github wf

Screenshot from 2020-04-01 01-06-19

akilawickey avatar Mar 31 '20 19:03 akilawickey

On GitHub actions, you need to set up Flutter - the offered Dart image does not include Flutter. See https://github.com/flutter/flutter-intellij/issues/3807#issuecomment-566000300.

(I don't think that's related to @balajiks-dev's original issue here though).

DanTup avatar Mar 31 '20 19:03 DanTup

yeah @DanTup issue was the environment. Thanks

akilawickey avatar Mar 31 '20 19:03 akilawickey

In case if your error is exactly the same as given above in the title. Follow these steps:-

1.Press [ Ctrl + Alt + S ] to open settings. 2.Open Languages and Frameworks. 3. Select Flutter. 4. You will see a Flutter SDK path empty. Provide the location for your flutter SDK where you've downloaded your flutter from the web.

After that try again clicking get dependencies and your error must be solved.

God bless you!

techforces avatar Jun 19 '20 13:06 techforces

I think @DanTup is on to something here. In Preferences, under Languages & Frameworks, is there a Flutter SDK set for the project?

Locating SDK to where flutter was installed worked for me. Thank You.

Ruudra1 avatar Aug 15 '20 12:08 Ruudra1

In case if your error is exactly the same as given above in the title. Follow these steps:- 1.Press [ Ctrl + Alt + S ] to open settings. 2.Open Languages and Frameworks. 3. Select Flutter. 4. You will see a Flutter SDK path empty. Provide the location for your flutter SDK where you've downloaded your flutter from the web. After that try again clicking get dependencies and your error must be solved.

God bless you!

Thank You.

Ruudra1 avatar Aug 15 '20 12:08 Ruudra1

HELP HELP HELP !!!!!!

Because levana depends on integration_test any from sdk which doesn't exist (could not find package integration_test in the Flutter SDK), version solving failed.

FunlabStudio avatar Jan 27 '21 11:01 FunlabStudio

HELP HELP HELP !!!!!!

Because levana depends on integration_test any from sdk which doesn't exist (could not find package integration_test in the Flutter SDK), version solving failed.

metoo!!!

fikyair avatar Feb 25 '21 07:02 fikyair

HELP HELP HELP !!!!!! Because levana depends on integration_test any from sdk which doesn't exist (could not find package integration_test in the Flutter SDK), version solving failed.

metoo!!!

Same here!

janfaris24 avatar Mar 08 '21 04:03 janfaris24

In my case something that I did (not sure what) caused Android Studio to have a weird test configuration by default. flutter test worked from the command line, but when I ran from Android Studio it failed. The output showed it was running something like (not that this is pub test, not flutter test):

/path/to/fluttersdk/bin/dart-cache/pub test -r json /path/to/my/project

Right clicking on the test folder and adding a new configuration for a Flutter Test, rather than a Dart Test, got it working again. Not sure how that happened. Very confusing error though.

srsudar avatar Jun 14 '21 00:06 srsudar

depends on flutter_test any from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.

SOLUTION

Run this command

flutter pub upgrade

rehman20281 avatar Oct 06 '21 16:10 rehman20281

This solved the flutter_test any from sdk which doesn't exist error for me and was not mentioned here yet:

I had the same issue, I re-installed (I had installed but I don't know why it was showing not installed ) flutter plug-in and the problem was solved.

Settings -> plugins -> Markateplace -> Flutter

https://stackoverflow.com/a/63369496/12320109

grgkro avatar Aug 20 '22 09:08 grgkro

how can this be done on mac ?

samstickkz avatar Feb 11 '23 08:02 samstickkz

In case if your error is exactly the same as given above in the title. Follow these steps:-

1.Press [ Ctrl + Alt + S ] to open settings. 2.Open Languages and Frameworks. 3. Select Flutter. 4. You will see a Flutter SDK path empty. Provide the location for your flutter SDK where you've downloaded your flutter from the web.

After that try again clicking get dependencies and your error must be solved.

i did what you said but i my flutter sdk is founded and problem didn't solve

IslamEldahshan avatar Aug 15 '23 09:08 IslamEldahshan

In case if your error is exactly the same as given above in the title. Follow these steps:- 1.Press [ Ctrl + Alt + S ] to open settings. 2.Open Languages and Frameworks. 3. Select Flutter. 4. You will see a Flutter SDK path empty. Provide the location for your flutter SDK where you've downloaded your flutter from the web. After that try again clicking get dependencies and your error must be solved.

i did what you said but i my flutter sdk is founded and problem didn't solve

Been a while since I had that same issue. It was 4 years back. I'll get back to you once I find the solution again :)

utkarshpateriya avatar Aug 17 '23 04:08 utkarshpateriya