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

The current Flutter SDK version is 0.0.0-unknown. #31

Open
safvan-husain opened this issue Feb 10, 2024 · 5 comments
Open

The current Flutter SDK version is 0.0.0-unknown. #31

safvan-husain opened this issue Feb 10, 2024 · 5 comments

Comments

@safvan-husain
Copy link

The current Flutter SDK version is 0.0.0-unknown.

@bawahakim
Copy link

That happens to me if I use USER root, when I set back to the default user mobiledevops it works as expected

@j-j-gajjar
Copy link

j-j-gajjar commented May 19, 2024

image: mobiledevops/flutter-sdk-image
__

+ flutter pub get
fatal: detected dubious ownership in repository at '/home/mobiledevops/.flutter-sdk'
To add an exception for this directory, call:

	git config --global --add safe.directory /home/mobiledevops/.flutter-sdk
Found an existing Pub cache at /home/mobiledevops/.pub-cache.

It can be repaired by running `dart pub cache repair`.
It can be reset by running `dart pub cache clean`.

Resolving dependencies...
The current Dart SDK version is 3.3.2.
The current Flutter SDK version is 0.0.0-unknown.

Because firebase_core >=0.1.0 requires Flutter SDK version >=0.1.4 and firebase_core <0.7.0-nullsafety.0 doesn't support null safety, firebase_core is forbidden.

So, because PROJECT_NAME depends on firebase_core any, version solving failed.

The lower bound of "sdk: '>=1.8.0 <2.0.0 or >=2.0.0-dev.28.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.

For details, see https://dart.dev/null-safety

You can try the following suggestion to make the pubspec resolve:
* Try using the Flutter SDK version: 3.22.0. 

@safvan-husain
Copy link
Author

downloading flutter SDK from github probably solve this issue, I had same issue when I was setting up flutter sdk on a linux machine not with Docker, but when I downloaded from githup, it able to detect the source as well as the version

@j-j-gajjar
Copy link

Hi @safvan-husain
Would you kindly provide me with a short code sample? This image wasn't successful when I attempted it in CI/CO.

@p1gp1g
Copy link

p1gp1g commented Aug 15, 2024

You can add a step to your CI run git config --global --add safe.directory /home/mobiledevops/.flutter-sdk
For example: https://codeberg.org/UnifiedPush/flutter-connector/src/branch/main/.woodpecker/main.yml#L9

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

4 participants