Flutter makes it easy and fast to build beautiful apps for mobile and beyond
Go to file
Mikhail Novoseltsev ae6d79336e
[tool] fix android studio preview's version parsing (#156293)
This PR willing to fix issue when `flutter doctor` validator can't determine version of Android Studio EAP.

These are before/after outputs of `flutter doctor -v` showcasing change in behaviour of validator. Each output has 3 `Android Studio` sections, 1 for stable and 2 for different EAP versions. 

<details>
<summary>before, (stable, 3.24.3), 2 issues related to versions of Android Studio</summary>

```console
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.7 23H124 darwin-arm64, locale en-RU)
    • Flutter version 3.24.3 on channel stable at /Users/samer/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (4 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/samer/Library/Android/sdk
    • Platform android-35, build-tools 34.0.0
    • Java binary at: /Users/samer/Library/Java/JavaVirtualMachines/jbr-17.0.7/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment JBR-17.0.7+7-964.1-nomod (build 17.0.7+7-b964.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode-16.0.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Users/samer/Applications/Android Studio Koala Feature Drop 2024.1.2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[!] Android Studio (version unknown)
    • Android Studio at /Users/samer/Applications/Android Studio Ladybug Feature Drop 2024.2.2 Canary 2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[!] Android Studio (version unknown)
    • Android Studio at /Users/samer/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] IntelliJ IDEA Ultimate Edition (version EAP IU-243.12818.47)
    • IntelliJ at /Users/samer/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.94.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.98.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554             • android-arm64  • Android 15 (API 35) (emulator)
    • iPhone (Михаил) (mobile)        • 00008020-001254DA1E39002E • ios            • iOS 17.6.1 21G93
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.7 23H124 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.7 23H124 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 129.0.6668.90
    ! Error: Browsing on the local area network for Михаил Новосельцев’s iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
```
</details>

<details>
<summary>after,  no issues regarding Android Studio</summary>

```console
[!] Flutter (Channel [user-branch], 3.26.0-1.0.pre.383, on macOS 14.7 23H124 darwin-arm64, locale en-RU)
    ! Flutter version 3.26.0-1.0.pre.383 on channel [user-branch] at /Users/samer/projects/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    • Upstream repository git@github.com:Sameri11/flutter.git
    • FLUTTER_GIT_URL = git@github.com:Sameri11/flutter.git
    • Framework revision 852508425d (20 minutes ago), 2024-10-07 21:22:45 +0500
    • Engine revision 683a14c1f1
    • Dart version 3.6.0 (build 3.6.0-326.0.dev)
    • DevTools version 2.40.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update
      checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/samer/Library/Android/sdk
    • Platform android-35, build-tools 34.0.0
    • Java binary at: /Users/samer/Library/Java/JavaVirtualMachines/jbr-17.0.7/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment JBR-17.0.7+7-964.1-nomod (build 17.0.7+7-b964.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode-16.0.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Users/samer/Applications/Android Studio Koala Feature Drop 2024.1.2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] Android Studio (version 2024.2.2)
    • Android Studio at /Users/samer/Applications/Android Studio Ladybug Feature Drop 2024.2.2 Canary 2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] Android Studio (version 2024.2.1)
    • Android Studio at /Users/samer/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] IntelliJ IDEA Ultimate Edition (version EAP IU-243.12818.47)
    • IntelliJ at /Users/samer/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.94.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.98.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554             • android-arm64  • Android 15 (API 35) (emulator)
    • iPhone (Михаил) (mobile)        • 00008020-001254DA1E39002E • ios            • iOS 17.6.1 21G93
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.7 23H124 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.7 23H124 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 129.0.6668.90
    ! Error: Browsing on the local area network for Михаил Новосельцев’s iPad. Ensure the device is unlocked and attached with a cable or
      associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```
</details>

Logic behind these changes explained in https://github.com/flutter/flutter/issues/121925#issuecomment-2352826925 

fixes #121925

**Tests**: updated existing tests by adding version checking, but I don't mind writing new ones if necessary – please tell me if so.
2024-10-16 15:56:31 +00:00
.github Bump actions/checkout from 4.2.0 to 4.2.1 (#156366) 2024-10-07 22:09:36 +00:00
.vscode Adjust repo config for VS Code formatting (#122758) 2023-04-14 12:35:42 +02:00
bin Roll Packages from bf751e6dff18 to a35f02d79d0e (2 revisions) (#156983) 2024-10-16 15:38:41 +00:00
dev Adjust timeout for devicelab tests (#156553) 2024-10-15 20:47:03 +00:00
docs Update triage doc (#155716) 2024-10-15 15:34:10 -05:00
examples Add tests for material_state_outlined_border.0.dart (#156814) 2024-10-15 14:36:36 +00:00
packages [tool] fix android studio preview's version parsing (#156293) 2024-10-16 15:56:31 +00:00
.ci.yaml increase sharding of Windows build_tests (#156763) 2024-10-14 22:52:24 +00:00
.gitattributes Add pre-stable support for create on Windows (#51895) 2020-03-23 10:42:26 -07:00
.gitignore Clean up .gitignore files (#153060) 2024-08-08 22:19:39 +00:00
analysis_options.yaml Remove non-functional, deprecated package_api_docs lint (#156603) 2024-10-11 21:17:19 +00:00
AUTHORS Fix ZoomPageTransitionsBuilder hardcoded fill color (#154057) 2024-09-05 10:57:17 -07:00
CHANGELOG.md update changelog on master (#155109) 2024-09-12 18:58:57 +00:00
CODE_OF_CONDUCT.md Update old wiki links (#149544) 2024-06-17 17:26:08 +00:00
CODEOWNERS remove fujino from CODEOWNERS (#155369) 2024-09-26 17:02:24 +00:00
CONTRIBUTING.md Misc docs cleanup and fixes (#155501) 2024-09-24 20:03:08 +00:00
dartdoc_options.yaml Move snippets package back into flutter repo (#147690) 2024-05-03 06:09:03 +00:00
flutter_console.bat License update (#45373) 2019-11-27 15:04:02 -08:00
LICENSE License update (#45373) 2019-11-27 15:04:02 -08:00
PATENT_GRANT Rename patent file (#38686) 2019-08-16 16:54:58 +01:00
README.md Update README.md (#155206) 2024-09-20 21:40:20 +00:00
TESTOWNERS [devicelab] remove raster cache benchmarks. (#156600) 2024-10-11 19:46:21 +00:00

Flutter

Flutter CI Status Discord badge Twitter handle codecov CII Best Practices SLSA 1

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

For announcements about new releases, follow the flutter-announce@googlegroups.com mailing list. Our documentation also tracks breaking changes across releases.

Terms of service

The Flutter tool may occasionally download resources from Google servers. By downloading or using the Flutter SDK, you agree to the Google Terms of Service: https://policies.google.com/terms

For example, when installed from GitHub (as opposed to from a prepackaged archive), the Flutter tool will download the Dart SDK from Google servers immediately when first run, as it is used to execute the flutter tool itself. This will also occur when Flutter is upgraded (e.g. by running the flutter upgrade command).

About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive, extensible and open development model, whether you're targeting iOS or Android, web, Windows, macOS, Linux or embedding it as the UI toolkit for a platform of your choice.

Beautiful user experiences

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework. Flutter's layered architecture gives you control over every pixel on the screen and its powerful compositing capabilities let you overlay and animate graphics, video, text, and controls without limitation. Flutter includes a full set of widgets that deliver pixel-perfect experiences whether you're building for iOS (Cupertino) or other platforms (Material), along with support for customizing or creating entirely new visual components.

Reflectly hero image

Fast results

Flutter is fast. It's powered by hardware-accelerated 2D graphics libraries like Skia (which underpins Chrome and Android) and Impeller. We architected Flutter to support glitch-free, jank-free graphics at the native speed of your device.

Flutter code is powered by the world-class Dart platform, which enables compilation to 32-bit and 64-bit ARM machine code for iOS and Android, JavaScript and WebAssembly for the web, as well as Intel x64 and ARM for desktop devices.

Dart diagram

Productive development

Flutter offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

Hot reload animation

Extensible and open model

Flutter works with any development tool (or none at all), and also includes editor plug-ins for both Visual Studio Code and IntelliJ / Android Studio. Flutter provides tens of thousands of packages to speed your development, regardless of your target platform. And accessing other native code is easy, with support for both FFI (on Android, on iOS, on macOS, and on Windows) as well as platform-specific APIs.

Flutter is a fully open-source project, and we welcome contributions. Information on how to get started can be found in our contributor guide.