flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.98k stars 319 forks source link

Error Getting Flutter SDK Information in Android Studio #6925

Closed samuelkchris closed 7 months ago

samuelkchris commented 1 year ago

Please file this bug report at https://github.com/flutter/flutter-intellij/issues/new.


What happened

While I was working with Android Studio, I encountered an issue related to the Flutter plugin. Specifically, when I tried to access Flutter SDK information, I received the following error. This error occurred when I attempted to access Flutter SDK information within Android Studio. Please note that I'm using Android Studio in its Canary version, and the Flutter and Dart plugins are also up-to-date.

If you have any suggestions or solutions to resolve this issue, please let me know.

Version information

Android Studio Iguana | 2023.2.1 Canary 6 • Flutter plugin io.flutter 75.1.4 • Dart plugin 232.9559.10

Error getting Flutter sdk information.

Exception

null

com.intellij.diagnostic.PluginException: io.flutter.actions.FlutterNewProjectAction PluginClassLoader(plugin=PluginDescriptor(name=Flutter, id=io.flutter, descriptorPath=plugin.xml, path=~\AppData\Roaming\Google\AndroidStudioPreview2023.2\plugins\flutter-intellij, version=75.1.4, package=null, isBundled=false), packagePrefix=null, state=active)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:1030)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImplKt.instantiate(ActionManagerImpl.kt:1420)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImplKt.convertStub(ActionManagerImpl.kt:1746)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.kt:311)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.kt:302)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.getChildren(DefaultActionGroup.java:357)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.getChildren(DefaultActionGroup.java:334)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenActionsUtil.collectAllActions(WelcomeScreenActionsUtil.java:37)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenActionsUtil.collectAllActions(WelcomeScreenActionsUtil.java:39)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenActionsUtil.splitAndWrapActions(WelcomeScreenActionsUtil.java:190)
    at com.intellij.openapi.wm.impl.welcomeScreen.ProjectsTab.createActionsToolbar(ProjectsTabFactory.kt:215)
    at com.intellij.openapi.wm.impl.welcomeScreen.ProjectsTab.createRecentProjectsPanel(ProjectsTabFactory.kt:185)
    at com.intellij.openapi.wm.impl.welcomeScreen.ProjectsTab.<init>(ProjectsTabFactory.kt:66)
    at com.intellij.openapi.wm.impl.welcomeScreen.ProjectsTabFactory.createWelcomeTab(ProjectsTabFactory.kt:58)
    at com.intellij.openapi.wm.WelcomeTabFactory.createWelcomeTabs(WelcomeTabFactory.java:31)
    at com.intellij.openapi.wm.impl.welcomeScreen.TabbedWelcomeScreen.loadTabs(TabbedWelcomeScreen.java:128)
    at com.intellij.openapi.wm.impl.welcomeScreen.TabbedWelcomeScreen.<init>(TabbedWelcomeScreen.java:86)
    at com.intellij.openapi.wm.impl.welcomeScreen.TabbedWelcomeScreen.<init>(TabbedWelcomeScreen.java:39)
    at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame.<init>(FlatWelcomeFrame.kt:69)
    at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame.<init>(FlatWelcomeFrame.kt)
    at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrameProvider.createFrame(FlatWelcomeFrameProvider.java:14)
    at com.android.tools.idea.welcome.wizard.FirstRunWizardFrameProvider.lambda$customizeFlatWelcomeFrame$2(FirstRunWizardFrameProvider.java:65)
    at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.computeSafeIfAny(ExtensionProcessingHelper.kt:57)
    at com.intellij.openapi.extensions.ExtensionPointName.computeSafeIfAny(ExtensionPointName.kt:57)
    at com.android.tools.idea.welcome.wizard.FirstRunWizardFrameProvider.customizeFlatWelcomeFrame(FirstRunWizardFrameProvider.java:59)
    at com.android.tools.idea.welcome.wizard.FirstRunWizardFrameProvider.createFrame(FirstRunWizardFrameProvider.java:46)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame$Companion$prepareToShow$2$frame$1.invoke(WelcomeFrame.kt:170)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame$Companion$prepareToShow$2$frame$1.invoke(WelcomeFrame.kt:170)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:168)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame$Companion.prepareToShow$lambda$3(WelcomeFrame.kt:170)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame$Companion$showIfNoProjectOpened$1$1.invoke(WelcomeFrame.kt:208)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame$Companion$showIfNoProjectOpened$1$1.invoke(WelcomeFrame.kt:204)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:248)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:199)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame$Companion$showIfNoProjectOpened$1.invokeSuspend(WelcomeFrame.kt:204)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:43)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
    at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:685)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:589)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.ClassNotFoundException: io.flutter.actions.FlutterNewProjectAction PluginClassLoader(plugin=PluginDescriptor(name=Flutter, id=io.flutter, descriptorPath=plugin.xml, path=~\AppData\Roaming\Google\AndroidStudioPreview2023.2\plugins\flutter-intellij, version=75.1.4, package=null, isBundled=false), packagePrefix=null, state=active)
    at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1607)
    at com.intellij.serviceContainer.ComponentManagerImplKt.access$doLoadClass(ComponentManagerImpl.kt:1)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:1022)
    ... 77 more

Version info

[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [Version 10.0.19045.3448], locale en-US) • Flutter version 3.13.6 on channel stable at E:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ead455963c (8 days ago), 2023-09-26 18:28:17 -0700 • Engine revision a794cf2681
• Dart version 3.1.3 • DevTools version 2.25.0

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at C:\Users..\AppData\Local\Android\Sdk • Platform android-UpsideDownCakePrivacySandbox, build-tools 34.0.0 • Java binary at: C:\Program Files\Android\Android Studio Preview\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.8+0--10799086) • All Android licenses accepted.

[√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.0 Preview 2.0) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Preview • Visual Studio Community 2022 version 17.8.34112.27 • The current Visual Studio installation is a pre-release version. It may not be supported by Flutter yet. • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2022.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 17.0.6+0-b2043.56-10027231)

[√] Android Studio (version 2023.2) • Android Studio at C:\Program Files\Android\Android Studio Preview • 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.8+0--10799086)

[√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.3448] • Chrome (web) • chrome • web-javascript • Google Chrome 117.0.5938.132 • Edge (web) • edge • web-javascript • Microsoft Edge 117.0.2045.47

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

• No issues found!

jwren commented 7 months ago

Duplicate of https://github.com/flutter/flutter-intellij/issues/6880