I am receiving error regarding Dart Messenger. Did anybody had some similar issue?
Fatal Exception: java.lang.IllegalStateException Reply already
submitted io.flutter.embedding.engine.dart.DartMessenger$Reply.reply
(DartMessenger.java:35)
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success
(MethodChannel.java:14)
io.flutter.plugins.localauth.LocalAuthPlugin$1.onFailure
(LocalAuthPlugin.java:18)
io.flutter.plugins.localauth.AuthenticationHelper.onAuthenticationError
(AuthenticationHelper.java:30)
Flutter doctor:
Flutter (Channel stable, 1.22.6, on macOS 11.2.3 20D91 darwin-x64, locale en-GB)
• Flutter version 1.22.6 at /Users/radmilabiga/Install/flutter
• Framework revision 9b2d32b605 (2 months ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/radmilabiga/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 50.0.1
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
Try changing your flutter channel to master or beta.
flutter channel beta
OR
flutter channel master
and then clean your project and install your packages.
flutter clean
flutter pub get
flutter run
Related
I have just installed new Android Studio Electric Eel and flutter stopped working.
Here's my flutter doctor -v:
PS E:\flutter-projects\json_test000> flutter doctor -v
[√] Flutter (Channel stable, 3.7.3, on Microsoft Windows [Version 10.0.19045.2486], locale en-US)
• Flutter version 3.7.3 on channel stable at E:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9944297138 (10 days ago), 2023-02-08 15:46:04 -0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Albert\AppData\Local\Android\Sdk
• Platform android-33, build-tools 30.0.3
• ANDROID_HOME = C:\Users\Albert\AppData\Local\Android\Sdk
• Java binary at: E:\Android studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.10)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.11.32126.315
• Windows 10 SDK version 10.0.18362.0
[!] Android Studio (version 2022.1)
• Android Studio at E:\Android-Studio-Update-Test
• 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
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] Android Studio (version 4.1)
• Android Studio at E:\Android studio
• 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 1.8.0_242-release-1644-b01)
[√] Connected device (5 available)
• SM A325F (mobile) • R58R60AXPXN • android-arm64 • Android 13 (API 33)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2486]
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.104
• Edge (web) • edge • web-javascript • Microsoft Edge 110.0.1587.46
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
I have already looked around and everyone seems to have the same answer, move jbr to jre. But I don't have jbr in my android studio folder. (My folder is also on E: but that isn't a problem since everything is migrated there). What should I do?
I had exactly the same problem.
WORKAROUND:
Browse to your Android Studio install directory in Windows Explorer
Copy jrb\* to jre
You can find more details here:
https://github.com/flutter/flutter/issues/118502
PS:
I had a simple Flutter project that worked fine 6 months ago. When I upgraded Android Studio to Electric Eel, several things broke:
A/S Electric Eel now installs its embedded Java to "jrb" instead of "jre"
WORAROUND: copy jrb\* to jre
My project happened to target SDKVersion 30; Electric Eel requires minimum SDK 31
WORKAROUND: hack your Flutter project's android\app\build.gradle:
android {
compileSdkVersion 30 => 31
targetSdkVersion 30 => 31
Electric Eel requires a newer Kotlin version
WORKAROUND:android\app\build.gradle:
buildscript {
ext.kotlin_version = '1.3.50' => '1.6.10'
I had this same problem and I downloaded dolphin again and all the problems were gone.
My Flutter apps keeps crashing on startup, so I decided to hook it up on Firebase Crashlytics and got the following stacktrace:
Fatal Exception: java.lang.NoSuchMethodError: No static method getMainExecutor(Landroid/content/Context;)Ljava/util/concurrent/Executor; in class Landroidx/core/content/ContextCompat; or its super classes (declaration of 'androidx.core.content.ContextCompat' appears in /data/app/com.praveeshramroop.athena-dAdDRJxBm7ruMHL6Qy7VrA==/base.apk)
at io.flutter.embedding.android.FlutterView.onAttachedToWindow(FlutterView.java:513)
at android.view.View.dispatchAttachedToWindow(View.java:18347)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3397)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1761)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:696)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
What should I do to solve this problem? Honestly, I don't even know where to start looking. Any idea how solve this predicament?
flutter doctor -v:
[!] Flutter (Channel unknown, 3.3.8, on Microsoft Windows [Version 10.0.22000.1335], locale en-US)
! Flutter version 3.3.8 on channel unknown at C:\Users\DELL\Downloads\flutter_windows_2.10.2-stable\flutter
! Upstream repository unknown
• Framework revision 52b3dc25f6 (8 weeks ago), 2022-11-09 12:09:26 +0800
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\Users\DELL\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.1)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32516.85
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 11.0.12+7-b1504.28-7817840)
[√] VS Code (version 1.74.2)
• VS Code at C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.56.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.1335]
• Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.125
• Edge (web) • edge • web-javascript • Microsoft Edge 108.0.1462.54
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
I'm trying to build my first flutter project, and just finished the installation. When attempting to build the default starter app to an android emulator, the following error shows up:
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\phcar\.android\debug.keystore": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1
This is the output of flutter doctor -v
[√] Flutter (Channel stable, 3.3.7, on Microsoft Windows [Version 10.0.19044.2130], locale en-US)
• Flutter version 3.3.7 on channel stable at D:\Coding_stuff\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e99c9c7cd9 (28 hours ago), 2022-11-01 16:59:00 -0700
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
• Android SDK at C:\Users\phcar\AppData\Local\Android\sdk
• Platform android-32, build-tools 33.0.0-rc1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.6)
• Visual Studio at D:\Coding_stuff\src\VisualStudio
• Visual Studio Community 2022 version 17.3.32929.385
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 11.0.10+0-b96-7249189)
[√] IntelliJ IDEA Community Edition (version 2021.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.3
• 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.73.0)
• VS Code at C:\Users\phcar\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.52.0
[√] Connected device (3 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.2130]
• Edge (web) • edge • web-javascript • Microsoft Edge 106.0.1370.34
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
I do not plan on developing for the web, so didn't bother to download chrome as I don't use it as my browser.
Any ideas on why this is happening?
how to solve this error I show many video on it but that can not works.
I tried also JDK 8 but it doesn't works. Currently running on JDK 15.
Installed java 15
**
flutter doctor -v
**
[√] Flutter (Channel dev, 2.3.0-0.1.pre, on Microsoft Windows [Version 10.0.19042.928], locale en-IN)
• Flutter version 2.3.0-0.1.pre at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d72bfb8d07 (4 weeks ago), 2021-04-26 06:05:55 -0700
• Engine revision de6e1adf97
• Dart version 2.14.0 (build 2.14.0-18.0.dev)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Savan Rajyaguru\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 11.0.8+10-b944.6842174)
[√] VS Code (version 1.56.0)
• VS Code at C:\Users\Savan Rajyaguru\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (2 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212
• Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.66
! Doctor found issues in 1 category.
**
flutter doctor --android-licenses
**
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:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
enter image description here
have you tried running this?
flutter doctor --android-licenses
First, check if you have the older JDK version such as
JDK 1.8.0_301
Java SE Development Kit 8u202
Download JDKs from here
JDK 8 versions
Choose your system info [bit] correctly.
Using older versions will run Flutter and Xamarin applications seamlessly
Or if you have installed JDK#Latest try downgrading them to an older version.
Steps to Reproduce
I am running flutter in windows 10. I previously had a running android setup. After cloning the flutter repo and updating path, I ran flutter doctor -v. The logs are below. Now after searching a bit for solving the problem, I came across to this solution from various stackoverflow answers: Flutter.io Android License Status Unknown
I at first executed this:
set JAVA_OPTS=-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
Though I don't know how to make it permanent. Then after running flutter doctor again, I came with another message, see log ###2
So it says Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.4). So I ran flutter doctor --android-licenses accordingly. And it gives another error, that is:
A newer version of the Android SDK is required. To update, run:
C:\Users\imazi\AppData\Local\Android\sdk\tools\bin\sdkmanager --update
Well, so I ran C:\Users\imazi\AppData\Local\Android\sdk\tools\bin\sdkmanager --update to update it. And it kinda updated successfully outputting [=======================================] 100% Computing updates...
So I thought the issue is solved and ran flutter doctor again but it seems that nothing has been changed the problem still remains. It is like a loop. I do everything and the problem remains as it is. The output of the last flutter doctor is in log ### 3
My java version is:
10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
Please help.
!! also opened a github issue here: https://github.com/flutter/flutter/issues/39637
Logs
1 flutter doctor -v
O:\Flutter installation>flutter doctor -v
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Active code page: 1252
Microsoft Windows [Version 10.0.18362.295], locale en-US)
• Flutter version 1.7.8+hotfix.4 at O:\Work_Anon\Flutter installation\flutter
• Framework revision 20e59316b8 (6 weeks ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
**• Android SDK at C:\Users\imazi\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: O:\Work_Anon\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
**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.dev/setup/#android-setup for detailed instructions.****
[!] Android Studio (version 3.4)
• Android Studio at O:\Work_Anon\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[!] Connected device
! No devices available
2 flutter doctor after set JAVA_OPTS=-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Active code page: 1252
Microsoft Windows [Version 10.0.18362.295], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
! 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.
[!] Connected device
! No devices available
3 last flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Active code page: 1252
Microsoft Windows [Version 10.0.18362.295], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1))
! 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.
[!] Connected device
! No devices available
Actually, the problem got solved after installing jdk 8 and setting JAVA_HOME accordingly this new jdk. Also in the sdkmanager.bat file, located in C:\Users\username\AppData\Local\Android\Sdk\tools\bin
I added the line set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_221"
No need to uninstall java 10. That solved the whole problem!
Check if the flutter path is added.
Restart your system
Then run flutter doctor --android-licenses
accept all the licenses that appear
again run flutter doctor
and check if the issue persists
I uninstall the java jdk from my system and then let my flutter doctor arise that error of " [!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)"
and then followed the solution that flutter doctor was giving as it says to run the command " flutter doctor --android-licenses " and then type " y " as it says you to accept the licenses provided to solve this problem of "[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)" and then I again ran flutter doctor and the problem was resolved.