I'm trying to create a Flutter app with Android-X
following this this INFORMATION,
the date is quite recent,
so I'm assuming they are up to date.
The problem is when I run on flutter console
flutter create -a kotlin -i swift --androidx my-app-name
I get this error:
Could not find an option named "androidx".
(running: flutter create blablabla everything works fine)
[edit: this is my flutter doctor]
Doctor summary (to see all details, run flutter doctor -v): [√]
Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows
[Version 10.0.17763.557], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK
version 28.0.3) [√] Android Studio (version 3.3) [√] VS Code (version
1.35.1) [√] Connected device (1 available)
• No issues found!
Did I miss something?
Related
I want to record voice on flutter desktop platform.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1526], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.5)
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
[√] Connected device (4 available)
Have you tried with the available flutter packages? If not, then try with flutter_desktop_audio_recorder or record. Both of them supports Windows.
Please follow the readme section for implementation details.
I am using the flutter package flutter_background_service
https://pub.dev/packages/flutter_background_service/example
when the app is resuming, I have this infinite message
Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: plugins.flutter.io/sensors/accelerometer. Response ID XXXX
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.2, on Microsoft Windows [version 10.0.19042.1526], locale fr-CD)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.9.4)
[✓] Android Studio (version 2020.3)
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.64.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
• No issues found!
You can see this post and this issue.
But unfortunately it's not fixed yet. Maybe this is a bug.
When I want to start my project the following message appears
Launching lib\main.dart on Chrome in debug mode...
Then Google Chrome starts but it doesn't show anything except a white screen.
I have already reinstalled flutter, Dart SDK and VS Code.
Flutter Doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19041.1052], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] IntelliJ IDEA Community Edition (version 2020.2)
[√] VS Code (version 1.57.1)
[√] Connected device (2 available)
When I run flutter doctor, it renders these 2 errors and I can't find a way to get over them:
C:\Users\Work pc>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [version 10.0.19041.928], locale fr-CH)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
X Cannot execute C:\ProgramData\Oracle\Java\javapath\java.exe to determine the version
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[!] Android Studio
X android-studio-dir = C:\Program
X Android Studio not found at C:\Program
[√] VS Code (version 1.55.2)
[√] Connected device (2 available)
! Doctor found issues in 2 categories.
I mainly have difficulties with solving the second problem, related to android studio.
Thanks a lot!
try running this command on your terminal flutter config --android-studio-dir=[path/to/android-studio]
Try running this command in your cmd
flutter config --android-studio-dir=""
Then restart all your editors for them to load new settings
Suddenly i started facing this error in my all project. Even I tried to create new project but failed too.
I am using stateful widget and when I try to access class variable using widget then i face this error.
Flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.6 19G2021, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.50.1)
[✓] Connected device (1 available)
I tried flutter clean but no luck.