Android Studio 1.1 preview 2 single test run NullPointerException - android

In Android Studio 1.1 preview 2, any single test auto-generated configuration (via context menu Run/Debug method test for example) produces the following NullPointer exception with stacktrace:
java.lang.NullPointerException
at org.jetbrains.android.run.testing.AndroidTestRunConfiguration.checkConfiguration(AndroidTestRunConfiguration.java:183)
at org.jetbrains.android.run.AndroidRunConfigurationBase.checkConfiguration(AndroidRunConfigurationBase.java:141)
at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings(RunnerAndConfigurationSettingsImpl.java:358)
at com.intellij.execution.impl.RunManagerImpl.canRunConfiguration(RunManagerImpl.java:524)
at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:97)
at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:73)
at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:398)
at com.intellij.execution.impl.ExecutionManagerImpl.access$400(ExecutionManagerImpl.java:61)
at com.intellij.execution.impl.ExecutionManagerImpl$4.run(ExecutionManagerImpl.java:375)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
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)
Has anyone else run into this issue? Any recommendations on how to work around this?

Workarounds for now:
Execute all tests in package or All unit tests
Open test configuration and re-select class and method explicitly from dialogs
after saving no issues with test run.
Install latest beta version from Android Studio Canary channel. Bug already fixed there and no new blockers found
This answer was originally posted by the author. This post has been edited to fit within Stack Overflow's Q/A format.

Related

Android Studio can't start after installation

After installing Android Studio, it doesn't start, but it displays the following error when fetching Android SDK component information:
Internal error. Please report to https://code.google.com/p/android/issues
java.lang.RuntimeException: java.lang.IllegalArgumentException: Argument for #NotNull parameter 'name' of com/android/tools/idea/welcome/Platform.<init> must not be null
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:178)
at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:52)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:362)
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)
Caused by: java.lang.IllegalArgumentException: Argument for #NotNull parameter 'name' of com/android/tools/idea/welcome/Platform.<init> must not be null
at com.android.tools.idea.welcome.Platform.<init>(Platform.java)
at com.android.tools.idea.welcome.Platform.getLatestPlatform(Platform.java:72)
at com.android.tools.idea.welcome.Platform.createSubtree(Platform.java:89)
at com.android.tools.idea.welcome.InstallComponentsPath.createComponentTree(InstallComponentsPath.java:81)
at com.android.tools.idea.welcome.InstallComponentsPath.init(InstallComponentsPath.java:215)
at com.android.tools.idea.wizard.DynamicWizardPath.attachToWizard(DynamicWizardPath.java:97)
at com.android.tools.idea.wizard.DynamicWizard.addPath(DynamicWizard.java:233)
at com.android.tools.idea.welcome.FirstRunWizard.init(FirstRunWizard.java:75)
at com.android.tools.idea.welcome.FirstRunWizardHost.setupWizard(FirstRunWizardHost.java:100)
at com.android.tools.idea.welcome.FirstRunWizardHost.getWelcomePanel(FirstRunWizardHost.java:92)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame.<init>(WelcomeFrame.java:68)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame.showNow(WelcomeFrame.java:173)
at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:302)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:172)
... 16 more
It occurred to me today. I think the reason is that mistakes occurred when fetching Android SDK component information. Here is my way to avoid this problem:
Open the folder bin under the directory where you installed your Android Studio.
Find the file idea.properties and open it with Notepad++, UltraEdit, or other edit tools.
Add disable.android.first.run=true as the final line and save the file.
Restart Android Studio.
Then it won't fetch any information and will be opened directly. I hope that will help you.
Just turn off the Internet connection.
Simply starting Android Studio when the Internet connection is off worked for me.
It will give a warning message that it cannot initiate the first run. Just ignore that warning, and you are done.
Please press okay and restart Android Studio. It will start normally.
Delete the two folders C:\Users\USER_NAME.android and C:\Users\USER_NAME.AndroidStudio. And delete all files in C:\Users\USER_NAME\AppData\Local\Temp
Remove and re-install Android Studio, and I used the SDK that I downloaded before and saved it as backup. Then I opened Android Studio when the Internet connection was off.
The best way is, make sure you do the 1st step up here then
turn off the internet then restart you computer.
I suggest you upgrade Android Studio to the stable 1.3.1 version. From the log, it seems there is a problem with an argument which seems to be null.
It's a known bug found in earlier versions of Android Studio and is reported by many users.
See Issue 183063: Start Failed - parameter 'name' of com/android/tools/idea/welcome/Platform. must not be null.
The best solution for now would be downloading the latest version of Android Studio which is version 1.3.

Android Studio exception in plugin Google Login "'userEmail' of com/google/gct/login/CredentialedUserRoster.setActiveUser must not be null"

Using Android Studio 1.2.1.1. When clicking the login icon (top right) I get this exception.
Argument for #NotNull parameter 'userEmail' of com/google/gct/login/CredentialedUserRoster.setActiveUser must not be null
java.lang.IllegalArgumentException: Argument for #NotNull parameter 'userEmail' of com/google/gct/login/CredentialedUserRoster.setActiveUser must not be null
at com.google.gct.login.CredentialedUserRoster.setActiveUser(CredentialedUserRoster.java)
at com.google.gct.login.GoogleLogin.setActiveUser(GoogleLogin.java:454)
at com.google.gct.login.ui.GoogleLoginUsersPanel.valueChanged(GoogleLoginUsersPanel.java:232)
at javax.swing.JList.fireSelectionValueChanged(JList.java:1798)
at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1812)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:154)
at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(DefaultListSelectionModel.java:685)
at javax.swing.JList.setValueIsAdjusting(JList.java:2142)
at javax.swing.plaf.basic.BasicListUI$Handler.mouseReleased(BasicListUI.java:2796)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
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:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
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:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:565)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
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)
I have tried to fix it by doing the following (no success):
rebooting my computer.
reinstalling Android Studio
following the suggested solution in Google sign in issue. I have revoked access to everything related to Android, Android Studio and the SDKs.
disabling and re-enabling the "Google Login" plugin
How can this be fixed? Or where should I look for this missing 'userEmail' parameter?
The same problem manifest in a different exception when I try to deploy my module to app engine:
Exception loading projects for null: 400 Bad Request
{
"error" : "invalid_grant",
"error_description" : "Token has been revoked."
}
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
"error" : "invalid_grant",
"error_description" : "Token has been revoked."
}
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:247)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at com.google.gct.idea.elysium.GoogleUserModelItem.loadUserProjects(GoogleUserModelItem.java:130)
at com.google.gct.idea.elysium.GoogleUserModelItem.access$100(GoogleUserModelItem.java:41)
at com.google.gct.idea.elysium.GoogleUserModelItem$1.run(GoogleUserModelItem.java:95)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
Note that this problem is not solved by the suggested solution in Google sign in issue. That solution suggests going to https://security.google.com/settings/security/permissions?pli=1 and revoking application access. I have allowed no access related to Android, Android Studio and the SDKs. Other applications running on my PC, like Chrome, can log in without issue.
This problem was a bug in Android Studio. It disappeared when I upgraded to the latest "canary channel" version. See http://tools.android.com/recent/androidstudio12beta3available to see what was fixed. FYI the version that works for me is:
Android Studio AI-141.1962279
Build #AI-141.1962279, built on May 27, 2015
JRE: 1.7.0_79-b15 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

Android Studio AI 140

[Not useful anymore]
I just updated to the latest version of Android Studio from Canary chanel and I have this error (see below).
I just open the new Android Studio, click on my project and wait to see the error. The popup
Gradle sync in progress
remains, but it does not do anything. And all the project is 'broken' : it does not find reference to anything.
I'm mac Mac OS X 10.10.2
java.lang.NullPointerException
at com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemShortcutsManager.getActionId(ExternalSystemShortcutsManager.java:64)
at com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemKeymapExtension.getActionPrefix(ExternalSystemKeymapExtension.java:149)
at com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemKeymapExtension$ExternalSystemRunConfigurationAction.<init>(ExternalSystemKeymapExtension.java:240)
at com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemKeymapExtension.updateRunConfigurationActions(ExternalSystemKeymapExtension.java:161)
at com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemShortcutsManager.scheduleRunConfigurationKeymapUpdate(ExternalSystemShortcutsManager.java:139)
at com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.init(ExternalProjectsManager.java:129)
at com.intellij.openapi.externalSystem.service.ExternalSystemStartupActivity$1.run(ExternalSystemStartupActivity.java:49)
at com.intellij.openapi.externalSystem.service.ExternalSystemStartupActivity.runActivity(ExternalSystemStartupActivity.java:79)
at com.intellij.ide.startup.impl.StartupManagerImpl$2.run(StartupManagerImpl.java:156)
at com.intellij.ide.startup.impl.StartupManagerImpl.runActivity(StartupManagerImpl.java:336)
at com.intellij.ide.startup.impl.StartupManagerImpl.access$700(StartupManagerImpl.java:59)
at com.intellij.ide.startup.impl.StartupManagerImpl$3.run(StartupManagerImpl.java:174)
at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:259)
at com.intellij.openapi.project.DumbServiceImpl.access$700(DumbServiceImpl.java:52)
at com.intellij.openapi.project.DumbServiceImpl$9.run(DumbServiceImpl.java:424)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Try using the standalone version, so that you can always go back to a working setup (download link). Plus, make a backup of your Studio preferences (just i case).
Moreover, try performing Invalidate caches/Restart and see if that fixes it.
Ok, I finally found a solution :
Create a new project and copy/paste the sources from the old project to the new one.
That's all.

NullPointerException when run with Intellij IDEA new libgdx project for android

Steps to reproduce:
download setur.jar - http://libgdx.badlogicgames.com/download.html
generate project for desktop, Android, iOS, HTML
open Intellij IDEA, press Open, and select build.gradle
wait while gradle will do the staff and than run android project
I am facing some strange issue:
15:32:20 Compilation completed successfully in 11 sec
15:32:20 NullPointerException: null
15:32:30 Error Report
Error Submitting Feedback: null
Consider creating an issue at Android Issue Tracker
if I press NullPointerException (link), there appears message and stacktrace:
message: Exception in plugin Android Support. x min ago. Occured 2 times since the last clear. Disable plugin... <-- this is a link (if I press this, than Android will be not visible by IDEA at all.
stacktrace:
java.lang.NullPointerException
at com.sun.proxy.$Proxy169.getMinSdkVersion(Unknown Source)
at com.android.tools.idea.model.AndroidModuleInfo.getMinSdkVersion(AndroidModuleInfo.java:71)
at org.jetbrains.android.facet.AndroidFacet.canRunOnDevice(AndroidFacet.java:560)
at org.jetbrains.android.facet.AndroidFacet.isCompatibleDevice(AndroidFacet.java:536)
at org.jetbrains.android.run.DeviceChooser$MyDeviceTableModel.getValueAt(DeviceChooser.java:352)
at javax.swing.JTable.getValueAt(JTable.java:2716)
at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:149)
at javax.swing.JTable.getRowHeight(JTable.java:993)
at javax.swing.JTable.getCellRect(JTable.java:2936)
at javax.swing.JTable.valueChanged(JTable.java:4697)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
at org.jetbrains.android.run.DeviceChooser.updateTable(DeviceChooser.java:227)
at org.jetbrains.android.run.DeviceChooser.init(DeviceChooser.java:150)
at org.jetbrains.android.run.ExtendedDeviceChooserDialog.<init>(ExtendedDeviceChooserDialog.java:124)
at org.jetbrains.android.run.AndroidRunningState.execute(AndroidRunningState.java:245)
at com.intellij.execution.runners.DefaultProgramRunner.doExecute(DefaultProgramRunner.java:38)
at org.jetbrains.android.run.AndroidDebugRunner.doExec(AndroidDebugRunner.java:144)
at org.jetbrains.android.run.AndroidDebugRunner.doExecute(AndroidDebugRunner.java:135)
at com.intellij.execution.runners.GenericProgramRunner$1.execute(GenericProgramRunner.java:48)
at com.intellij.execution.impl.ExecutionManagerImpl$2.run(ExecutionManagerImpl.java:208)
at com.intellij.openapi.project.DumbServiceImpl.runWhenSmart(DumbServiceImpl.java:95)
at com.intellij.execution.impl.ExecutionManagerImpl$1$1.run(ExecutionManagerImpl.java:172)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
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)
Android does not support Swing & Awt API. So your project should not depend on swing.* / awt.* packages if you want to run it on Android.
You should use the libgdx GUI elements only if you want your game to be cross-plattform. This guide should get you started: https://github.com/libgdx/libgdx/wiki/Scene2d
This is a bug that occurs with IntelliJ 13.x, the fix never made it into that branch.
IntelliJ 14+ and newer versions of Android Studio don't have this issue.
Source: Android Open Source Project Issue

Cannot build project due to gradle project sync in progress

I'm new on using android project version 0.82. I was creating a new apps (from scratch), and then I try to run the app. but the build process take forever because the gradle project sync failed, and in the top of the text editor, it says gradle project sync in progress. this takes forever. I've check the graddle wrapper properties, I've finished download the gradle 1.12 in the project before.
here is the idea log
2014-08-06 22:51:33,707 [ 284991] INFO - llij.help.impl.HelpManagerImpl - Failed to load help set from 'jar:file:///C:\Users\stephen\AppData\Local\Android\android-studio\help\ideahelp.jar!/idea/Help.hs'
javax.help.HelpSetException: Could not parse
Got an IOException (C:\Users\stephen\AppData\Local\Android\android-studio\help\ideahelp.jar (The system cannot find the path specified))
Parsing failed for null
at javax.help.HelpSet.<init>(HelpSet.java:146)
at com.intellij.help.impl.HelpManagerImpl.loadHelpSet(HelpManagerImpl.java:159)
at com.intellij.help.impl.HelpManagerImpl.createHelpSet(HelpManagerImpl.java:133)
at com.intellij.help.impl.HelpManagerImpl.invokeHelp(HelpManagerImpl.java:54)
at com.intellij.ide.actions.ContextHelpAction.actionPerformed(ContextHelpAction.java:42)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:170)
at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:133)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:313)
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:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
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:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
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)
Finally somehow after trying to invalidate the cache and restart several times doesn't give any effect, I try to restart my laptop and then it just worked. the build can finally be done.
In interest of why it happens, the reason is staring you right in the face, at what it tells you in the beginning of the above error-log: "Failed to load help set" or some such. I'm completely baffled at how a project sync or build could affect this....
The IDE is attempting to launch or read from a HelpSet jar, perhaps because you pushed a help button or clicked a menu item. If the referenced JAR file actually exists at the specified location, then perhaps the internal file is not readable within the JAR.
That a restart "solves" this is again odd; best guess to correct this? In my case, NetBeans IDE has a console log that is accessible from the View menu, and I presume other IDEs have a debug, diagnostic, or "console" log somewhere. Check your IDE log(s); it may take a little bit of time and exploration to see what's being posted as output.
This isn't a strictly android-studio, or idea, or even Java problem, either; any sufficiently-developed bit of software or IDE can also experience this.

Categories

Resources