Reputation: 1217
I want to use Firebase Assistant in Android Studio, which is supposed to be in the Tools Menu. I use Android Studio 3.1 for Windows. When I click on the Tools menu, I get:
There is no Firebase menu. So I tried to invoke it through Help -> Find Action... When I enter Firebase, I get this error message:
java.util.NoSuchElementException
at com.google.common.collect.Iterators$1.next(Iterators.java:81)
at com.google.services.firebase.DependencyStateManager.getDependencyState(DependencyStateManager.java:60)
at com.google.services.firebase.DependencyStateManager.init(DependencyStateManager.java:109)
at com.android.tools.idea.assistant.view.StatefulButton.<init>(StatefulButton.java:122)
at com.android.tools.idea.assistant.view.TutorialStep.<init>(TutorialStep.java:106)
at com.android.tools.idea.assistant.view.TutorialCard.redraw(TutorialCard.java:153)
at com.android.tools.idea.assistant.view.TutorialCard.<init>(TutorialCard.java:90)
at com.android.tools.idea.assistant.view.FeaturesPanel.<init>(FeaturesPanel.java:84)
at com.android.tools.idea.assistant.AssistSidePanel.<init>(AssistSidePanel.java:81)
at com.android.tools.idea.assistant.AssistToolWindowFactory.createToolWindowContent(AssistToolWindowFactory.java:37)
at com.android.tools.idea.assistant.OpenAssistSidePanelAction.lambda$openWindow$0(OpenAssistSidePanelAction.java:59)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
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:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
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)
I have also checked that the Firebase plugins are activated. Any ideas what went wrong?
Upvotes: 9
Views: 7488
Reputation: 489
If Google repository is installed then I think you need to start plugins
In Android Studio, just go to File -> Settings, click on Plugins and then enable all Firebase plugins.
I hope this will work.
Upvotes: 1
Reputation: 1457
If Google Repository is already existed, but still can't find firebase tool. Try Add firebase plugin. Preferences -> Plugins, choose "Firebase Services", and "Firebase App Indexing", "App Links Assistant". Restart Android Studio.
Upvotes: 12
Reputation: 2375
In my case, I'd copied my app's build.gradle on top of my module's build.gradle. Because of that, I was missing the:
apply plugin: 'com.android.application'
line (and a lot more) from the module's build.gradle. Because Android Studio didn't think it was an Android app, there was no Firebase menu.
Upvotes: -1
Reputation: 4269
First make sure you have installed Google Repository version 26 or higher, using the following steps:
Click Tools > SDK Manager.
Click the SDK Tools tab.
Check the Google Repository checkbox, and click OK.
Click OK to install.
Click Background to complete the installation in the background, or wait for the installation to complete and click Finish.
You can now open and use the Assistant window in Android Studio by following these steps:
Reference : For more refer to this URL
Upvotes: 2