MobileDevOps / flutter-sdk-image

Docker image with Flutter SDK to build Android apps
https://hub.docker.com/r/mobiledevops/flutter-sdk-image/
MIT License
31 stars 32 forks source link

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

Open safvan-husain opened 9 months ago

safvan-husain commented 9 months ago

The current Flutter SDK version is 0.0.0-unknown.

bawahakim commented 9 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 5 months ago

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 commented 3 months ago

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