I receive this error while trying to run Flutter app : Could not find an option named "devtools-server-address" - flutter

I was developing a Flutter app using the stable channel, in Android Studio, now I upgraded Flutter Plugin to 53 and now when I try to run my app I receive this error
Could not find an option named "devtools-server-address".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
Someone suggested using the dev channel, but I need to continue in the stable channel!
Suggestion Link:
Could not find an option named "devtools-server-address". when trying to run flutter app from AndroidStudio

Just found the fix:
$ flutter upgrade
$ flutter clean
Then select Invalidate Caches / Restart from the Android Studio File menu!

Follow the following steps:
Run the command flutter clean from terminal.
Go to File -> Invalidate Cache and Restart -> Invalidate and Restart.
Now try running your app. The issue should disappear.
If the error still persists: Go to File -> Settings -> Language & frameworks -> Flutter.
Check that the sdk path is appropriate as shown in below image:
Check the Dart sdk path too:
This should solve your problem.

Follow the steps:
File -> Invalidate Cache and Restart.
Run flutter clean
Worked For me.

For a little bit more details, you could also run flutter doctor to see what is happening.
In my case, I've recently updated Android Studio to version 4.2 and when I run the command it gives me:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 1.22.6, on macOS 11.2.2 20D80 darwin-x64, locale en-GI)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[!] Android Studio (version 4.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2019.3.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Community Edition (version 2020.1.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
! Doctor found issues in 3 categories.
As well you could run flutter doctor -v as specified to get more details as verbose (where -v stands for verbose)
In my case the plugins where not visible for Android Studio and wasn't using a stable version of Flutter which didn't allow me to enable the plugins, although they were installed.
After this I've switched to a stable version of Flutter, double checked any required updated from Android Studio, uninstall and re-install the plugins and worked like a charm.
Want to mention that flutter clean and flutter pub get were necesarry afterwards.

Related

Why it shows parameter not correct on flutter? [duplicate]

I am new to Flutter and today I've been stuck to one problem. I cannot debug my app because it says parameter format not correct
Parameter format not correct -
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> Several variant outputs are configured to use the same file name "resources-debug.ap_", filters : MAIN:MAIN
Here's my flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18362.900], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.4)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.46.1)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
I've looked for answers everywhere and they didn't work for my case. Most of the solutions are suggesting to change environment path. This is my path: C:\src\flutter\bin
note: I'm using VSCode
Please help.. thank you!
As I observe your Flutter Doctor, it's already defined that Android toolchain and the Android Studioandroid studio is not configured. So. follow the below steps.
For resolve Android toolchain run the "flutter doctor --android-licenses". And for "Android Studio" resolve please goto Android Studio -> Files -> Settings -> Plugins -> install the Flutter. While installing flutter its also asked for install dart click ok and after installation, it will ask to restart the Android Studio. After restart goes to Flutter terminal and runs Flutter Doctor, Now you have resolved the above issue. The last issue is just ignored because it's just showing that no devices are connected.
And you can run the Flutter in Android Studio in Windows and Mac.
This error occurred because of the app level Gradle.file minSdkVersion property is less than 20 or the targetSdkVersion property is less than 30.
It may work for you. In my case, it works perfectly.
minSdkVersion : 20
targetSdkVersion : 30
run these in your project folder,
flutter channel stable
flutter upgrade --force
flutter pub cache repair
flutter clean
Now try to run

Flutter and Dart plugin not installed errror when downgrade flutter even though they are installed on android studio

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel unknown, v1.4.0, on Microsoft Windows [Version 10.0.19041.804], locale en-IE)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.io/setup/#android-setup for detailed
instructions.
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.52.1)
[!] Connected device
! No devices available
I was using the latest version of flutter, ran flutter doctor, everything was fine. I then downgraded flutter now it's saying I don't have the flutter and Dart pluggins installed even though I do.
I ran this command - flutter doctor --android-licenses and received the following error
A newer version of the Android SDK is required. To update, run: C:\Users\willm\AppData\Local\Android\sdk\tools\bin\sdkmanager --update
I then ran the command it told me to run and received this error
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
I have now ran out of ideas, any advice on what to do without upgrading flutter again?
There are some solutions that maybe helpful
1). Solution 1
Run Flutter clean ann rebuild the app
2). Solution 2
Accept Licenses by running following commands
You just have to accept license by running this command
yes | sdkmanager --licenses
for Linux Use:
yes | ~/Android/Sdk/tools/bin/sdkmanager --licenses
for Windows Use:
%ANDROID_HOME%/tools/bin/sdkmanager --licenses
Note: set
%ANDROID_HOME%
as
C:\Users\username\AppData\Local\Android\Sdk
After that check licenses
Flutter:
flutter doctor --android-licenses
3).Solution 3
the current SDK version is incompatible with Java 9.
So, to solve it, you can downgrade your java version to Java 8, or with a workaround, you can export the following option on your terminal:
Linux:
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
Windows:
set JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
And to make it stick, you can export the JAVA_OPTS in your profile file on Linux (.zshrc, .bashrc and etc.) or add as an environment permanently on Windows.
Then, you can type the flutter or sdkmanager command:
Flutter:
flutter doctor --android-licenses
sdkmanager:
sdkmanager --licenses
and type Y when needed to accept the licenses.
so i was experiencing the same issue after upgrading to flutter 2.0, but some packages aren't ready. because of that i had to downgrade. Even though flutter doctor said:
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
I was still able to build and test app without issues. So try rebuilding and running app. hopefully when it's save to upgrade to 2.0 these little things will go.

Android Studio Dart And Flutter Plugin is not installed

Here is the flutter doctor result:
[√] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version 10.0.18362.30], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
I have already installed the flutter plugin. But the problem still exists. How can I fix this?
Just run this on your terminal (Mac users)
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
Well hello all
I would suggest you all to follow the steps what flutter documentation sites tells you to do
For windows-->There are some people who got detected flutter and dart plugins by the flutter doctor and few are not
I got this issue when I tried to install ...
I did everything like installed flutter and dart plugin still my flutter doctor haven't detected the plugins ...
following steps worked for me
flutter channel dev
flutter upgrade
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
flutter doctor -v
note :--- flutter config --android-studio-dir="C:\Program Files\Android\Android Studio" should be example flutter config "C:\Program Files\Android\Android Studio"
above steps worked for me i hope it will helps you too :)
change channel master to dev.
then upgrade.
flutter channel dev
flutter channel upgrade
try again
flutter doctor
Note: I think it's Android Studio 4.1 issue...
Since you say you have flutter plugin installed in Android Studio, and if Android Studio correctly shows your installed plugin, there is no reason to believe any third-party tool reporting otherwise.
Also, this will not affect your flutter development and your IDE plugins will work as expected inside the IDE and flutter tool's commands work independent of the IDE in use.
Android Studio 4.1 apparently changed its default plugin install path.
Related github issue: [flutter_tools] IDE plugin validators should be deprecated #61246
Flutter does not directly use the IDE plugins, so doctor failing to detect them does not affect any behavior (it's just annoying).
open terminal:
run> flutter channel dev
run> flutter channel updrade
open terminal:
Mac User:
flutter config --android-studio-dir=/Applications/Android\ Studio.app
Reinstall Flutter Plugin from Android Studio
Are you using Android Studio V 4.1?
With Android Studio V4.1 there is a problem.
Try to reinstall Android Studio but Version 4.0.1 and try it again, chances are this will fix your problem.
Open Android studio
Follow the Path Configure > Plugins > marketplace > search Flutter & Dart > Install
Restart IDE(Android studio)
Open Terminal and Export Flutter Path
and run flutter doctor -v
If you are upgrading for an existing project:
Run
git clone https://github.com/flutter/flutter.git
in your terminal.
The be sure to delete the Flutter folder in your App's root directory. Otherwise you will get over 50k errors popping up
Check your flutter PATH
which flutter
if you get /path-to-flutter-sdk/bin//flutter or similar you may have added an extra / in your $HOME/.rc_file. Remove the last '/', restart terminal and try again
this worked for me
flutter channel dev
flutter doctor

flutter: parameter format not correct

I am new to Flutter and today I've been stuck to one problem. I cannot debug my app because it says parameter format not correct
Parameter format not correct -
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> Several variant outputs are configured to use the same file name "resources-debug.ap_", filters : MAIN:MAIN
Here's my flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18362.900], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.4)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.46.1)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
I've looked for answers everywhere and they didn't work for my case. Most of the solutions are suggesting to change environment path. This is my path: C:\src\flutter\bin
note: I'm using VSCode
Please help.. thank you!
As I observe your Flutter Doctor, it's already defined that Android toolchain and the Android Studioandroid studio is not configured. So. follow the below steps.
For resolve Android toolchain run the "flutter doctor --android-licenses". And for "Android Studio" resolve please goto Android Studio -> Files -> Settings -> Plugins -> install the Flutter. While installing flutter its also asked for install dart click ok and after installation, it will ask to restart the Android Studio. After restart goes to Flutter terminal and runs Flutter Doctor, Now you have resolved the above issue. The last issue is just ignored because it's just showing that no devices are connected.
And you can run the Flutter in Android Studio in Windows and Mac.
This error occurred because of the app level Gradle.file minSdkVersion property is less than 20 or the targetSdkVersion property is less than 30.
It may work for you. In my case, it works perfectly.
minSdkVersion : 20
targetSdkVersion : 30
run these in your project folder,
flutter channel stable
flutter upgrade --force
flutter pub cache repair
flutter clean
Now try to run

Couldn't read file Instance of 'ErrorHandlingFile' even though it exists. Please verify that this file has read permission and try again

My Flutter App is not compiling because of this error:
Couldn't read file Instance of 'ErrorHandlingFile' even though it
exists. Please verify that this file has read permission and try again
I tired switching channels and changing versions but nothing has worked yet.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.13.6, on Mac OS X 10.15.1 19B88, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
✗ Android Studio not found at /Applications/Android/Contents
[!] IntelliJ IDEA Community Edition (version 2019.2.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.36.1)
[✓] Connected device (3 available)
! Doctor found issues in 2 categories.
Any Ideas?
Had the same problem after upgrade to beta channel.
Found that this error message just a top of an iceberg, real problem is in one of your plugins.
Read the discussion in this issue to manually debug your application or wait for fix which will result in an appropriate error message.
If you are lucky - simple flutter pub upgrade will solve the issue for your project.
If not, as a hot-fix you can downgrade your flutter version.