flutter-intellij: Can not create New flutter project in Android Studio 4.0 Canary 4

What happened

Android Studio > File (menu) > New > New flutter project…

No dialog opened. Alert “IDE Error Occurred” in right bottom of Android Studio window.

Version information

Android Studio 4.0 Canary 4 • Flutter plugin io.flutter 41.2.3 • Dart plugin 192.7761

Flutter 1.9.1+hotfix.6 • channel stable • https://github.com/flutter/flutter.git Framework • revision 68587a0916 (2 months ago) • 2019-09-13 19:46:58 -0700 Engine • revision b863200c37 Tools • Dart 2.5.0

Exception

null

java.lang.NoSuchMethodError: com.android.tools.adtui.validation.ValidatorPanel.registerValidator(Lcom/android/tools/idea/observable/ObservableValue;Lcom/android/tools/adtui/validation/Validator;)V
	at io.flutter.project.FlutterProjectStep.onWizardStarting(FlutterProjectStep.java:148)
	at com.android.tools.idea.wizard.model.ModelWizard.<init>(ModelWizard.java:124)
	at com.android.tools.idea.wizard.model.ModelWizard.<init>(ModelWizard.java:47)
	at com.android.tools.idea.wizard.model.ModelWizard$Builder.build(ModelWizard.java:560)
	at io.flutter.actions.FlutterNewProjectAction.actionPerformed(FlutterNewProjectAction.java:52)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:265)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:265)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:82)
	at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:106)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:115)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:193)
	at java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:389)
	at java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:357)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:769)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:739)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:824)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:773)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:412)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:411)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
% flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G95, locale ja-JP)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio
[✓] Android Studio
[!] IntelliJ IDEA Ultimate Edition (version 2019.2.4)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 18 (4 by maintainers)

Most upvoted comments

@evandrojr Android Studio 4.0 is fully supported. Before an update, you may see a message that Plugins incompatibe with the new build found, but it’s false warning. Update the IDE and then the plugins, and all will work fine. See also https://github.com/flutter/flutter-intellij/issues/4581.

It would be nice to have the message fixed too.

Sure, it’s fixed already but the fix doesn’t appear in Android Studio 4.0.

I install plugin Flutter in my IDE android studio 4.0. but I did not see any option to run Flutter.

Android Studio Arctic Fox | 2020.3.1 Canary 12 Same here - no new flutter project option in menu.

It would be nice to have the message fixed too.

Sure, it’s fixed already but the fix doesn’t appear in Android Studio 4.0.

Good afternoon It would be nice to fix in version 3

Because many are still in doubt whether it will be compatible or not (like me)

Android Studio 4 canary builds are not supported by the Flutter plugin. We used to have a message that appeared when the IDE was first started. That interfered with people who were using AS for Android projects. We changed it to show a message when a Flutter project was opened. Due to recent changes in the API we cannot create projects anymore, so lots of people are seeing this who may not see the warning.

@devoncarew Catching the exception in FlutterNewProjectAction.actionPerformed() would be better than having people add issues like this. This is in line with your suggestion to improve the messaging here.