Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems generating Google App Engine Backend in Android Studio

I'm not able to use the backend generation feature in the Android Studio. I followed this blog post trying to set up a backend for my application, however I'm getting the following IDE error:

Exception in plugin Maven Integration

Argument 0 for @NotNull parameter of com/intellij/util/containers/ContainerUtil.map must not be null: Argument 0 for @NotNull parameter of com/intellij/util/containers/ContainerUtil.map must not be null
java.lang.IllegalArgumentException: Argument 0 for @NotNull parameter of com/intellij/util/containers/ContainerUtil.map must not be null
    at com.intellij.util.containers.ContainerUtil.map(ContainerUtil.java)
    at org.jetbrains.idea.maven.utils.MavenUtil.collectFiles(MavenUtil.java:247)
    at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.commit(MavenProjectBuilder.java:129)
    at com.intellij.projectImport.ProjectImportBuilder.commit(ProjectImportBuilder.java:59)
    at com.google.gct.intellij.endpoints.externalbuilder.MavenBackendGeneratorHelper.addMavenFunctionality(MavenBackendGeneratorHelper.java:216)
    at com.google.gct.intellij.endpoints.externalbuilder.ui.GenerateMavenBackend.actionPerformed(GenerateMavenBackend.java:115)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:260)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:892)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:114)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:230)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:104)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
    at java.awt.Component.processMouseEvent(Component.java:6505)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6270)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:688)
    at java.awt.EventQueue$3.run(EventQueue.java:686)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:702)
    at java.awt.EventQueue$4.run(EventQueue.java:700)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:686)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:510)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:339)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

After the process finishes, I only get the -AppEngine module generated, with no -endpoints module.

I'm sure that Maven is set up properly on my machine, I checked with this issue that also complains about not being able to generate the backend.

Is there a solution to this problem?

like image 320
Egor Avatar asked Aug 07 '13 12:08

Egor


Video Answer


1 Answers

[windows 8] get 0.4.0 Android Studio, New Project, click on the to select Tools>Google Cloud Tools>Generate App Engine

provide Project Number and Project ID and API Key, from https://cloud.google.com/console#/project looks like you already know about this

This will generate -AppEngine and -endpoints

Select -endpoints on the left Project browser, then Tools>Google Cloud Tools>Generate Client Libraries (this makes the .war that get deployed with app-engine so app-engine code can deal with endpoint code)

Click on "Maven Projects" written vertically on the far right top, click Plugins>appengine, click appengine:update

That will deploy the appengine.

(Jan 7 '14) You have to go back to the console and reselect the correct Version in order for the app to Register with the Endpoint Service.

go here: https://cloud.google.com/console#/project, then click AppEngine, then click Versions, then click the latest Version, then click Make Default

like image 135
cube108 Avatar answered Sep 18 '22 08:09

cube108