Intellij 2019 2.3 Exception in plugin Andriod Support - android

I need help, when on the design tab in activity_main.xml, clicking on a widget causes the error. Also the attributes panel for the widgets are blank no matter which i click and sometimes shows loading but never appears.Tried switching to the "all attributes view" but still can change any of the attributes.
Already tried to deactivate the instant run, invalidate caches, slightly older version of IntelliJ, deleting and re-downloading IntelliJ and "clean project"
the error msg:
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsComboBoxUI
at com.android.tools.idea.common.property.editors.EnumEditor$CustomComboBox.setUI(EnumEditor.java:470)
at java.desktop/javax.swing.JComboBox.updateUI(JComboBox.java:277)
at java.desktop/javax.swing.JComboBox.init(JComboBox.java:236)
at java.desktop/javax.swing.JComboBox.<init>(JComboBox.java:230)
at com.intellij.openapi.ui.ComboBoxWithWidePopup.<init>(ComboBoxWithWidePopup.java:15)
at com.intellij.openapi.ui.ComboBox.<init>(ComboBox.java:44)
at com.android.tools.idea.common.property.editors.EnumEditor$CustomComboBox.<init>(EnumEditor.java:440)
at com.android.tools.idea.uibuilder.property.editors.NlEnumEditor.createForInspectorWithBrowseButton(NlEnumEditor.java:45)
at com.android.tools.idea.uibuilder.property.inspector.IdInspectorProvider$IdInspectorComponent.<init>(IdInspectorProvider.java:96)
at com.android.tools.idea.uibuilder.property.inspector.IdInspectorProvider.createCustomInspector(IdInspectorProvider.java:74)
at com.android.tools.idea.uibuilder.property.inspector.IdInspectorProvider.createCustomInspector(IdInspectorProvider.java:39)
at com.android.tools.idea.common.property.inspector.InspectorProviders.createInspectorComponents(InspectorProviders.java:54)
at com.android.tools.idea.common.property.inspector.InspectorPanel.setComponent(InspectorPanel.java:260)
at com.android.tools.idea.uibuilder.property.NlPropertiesPanel.setItems(NlPropertiesPanel.java:281)
at com.android.tools.idea.common.property.PropertiesManager.lambda$null$0(PropertiesManager.java:247)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
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.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.windows.WindowsComboBoxUI PluginClassLoader[org.jetbrains.android, 10.3.4] com.intellij.ide.plugins.cl.PluginClassLoader#7355d4d1
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:75)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 33 more

It is the issue with compatibility with 11 JDK that IDE uses to tun. Configure IDE to run under 1.8 JDK: can be downloaded from bintray and set via JDK Switcher as per Switch boot JDK steps or download IntelliJ IDEA with bundled 8 JBR from Other IntelliJ IDEA Versions.

Related

Android IDE error - AlreadyDisposedException while opening Android studio

I have Android studio dolphin version.
While I try to open Android studio, an error dialog box appears and it shows like
IDE error occured
See details and submit report
And the report shows an error as below
com.intellij.serviceContainer.AlreadyDisposedException: Already disposed: Module: 'AppName.app' (disposed)
at com.intellij.serviceContainer.ComponentManagerImpl.checkState(ComponentManagerImpl.kt:184)
at com.intellij.serviceContainer.ComponentManagerImpl.getComponent(ComponentManagerImpl.kt:533)
at com.intellij.facet.FacetManager.getInstance(FacetManager.java:15)
at com.intellij.facet.impl.ProjectFacetManagerImpl.getIndex(ProjectFacetManagerImpl.java:76)
at com.intellij.facet.impl.ProjectFacetManagerImpl.hasFacets(ProjectFacetManagerImpl.java:100)
at com.intellij.facet.impl.ui.FacetDependentToolWindowManager$1.facetRemoved(FacetDependentToolWindowManager.java:58)
at com.intellij.facet.impl.ProjectWideFacetListenersRegistryImpl$ProjectWideFacetListenerWrapper.facetRemoved(ProjectWideFacetListenersRegistryImpl.java:86)
at com.intellij.facet.impl.FacetEventsPublisher.onFacetRemoved(FacetEventsPublisher.kt:129)
at com.intellij.facet.impl.FacetEventsPublisher.onModuleRemoved(FacetEventsPublisher.kt:89)
at com.intellij.facet.impl.FacetEventsPublisher.access$onModuleRemoved(FacetEventsPublisher.kt:17)
at com.intellij.facet.impl.FacetEventsPublisher$1.moduleRemoved(FacetEventsPublisher.kt:29)
at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:645)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:624)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:417)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:390)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:372)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:33)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:179)
at com.sun.proxy.$Proxy87.moduleRemoved(Unknown Source)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerBridgeImpl.fireEventAndDisposeModule(ModuleManagerBridgeImpl.kt:63)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge.processModuleChange(ModuleManagerComponentBridge.kt:181)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge.access$processModuleChange(ModuleManagerComponentBridge.kt:45)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$2$changed$1.invoke(ModuleManagerComponentBridge.kt:126)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$2$changed$1.invoke(ModuleManagerComponentBridge.kt:74)
at com.intellij.workspaceModel.ide.impl.UtilsKt.executeOrQueueOnDispatchThread(utils.kt:13)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$2.changed(ModuleManagerComponentBridge.kt:102)
at com.intellij.workspaceModel.ide.WorkspaceModelTopics$EventsDispatcher.changed(WorkspaceModelTopics.kt:118)
at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:645)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:624)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:417)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:390)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:372)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:33)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:179)
at com.sun.proxy.$Proxy96.changed(Unknown Source)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelImpl.onChanged(WorkspaceModelImpl.kt:112)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelImpl.access$onChanged(WorkspaceModelImpl.kt:19)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelImpl$updateProjectModel$2.invoke(WorkspaceModelImpl.kt:75)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelImpl$updateProjectModel$2.invoke(WorkspaceModelImpl.kt:19)
at com.intellij.workspaceModel.storage.impl.VersionedEntityStorageImpl.replace(VersionedEntityStorageImpl.kt:183)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelImpl.updateProjectModel(WorkspaceModelImpl.kt:75)
at com.intellij.workspaceModel.ide.impl.jps.serialization.JpsProjectModelSynchronizer$applyLoadedStorage$1.run(JpsProjectModelSynchronizer.kt:212)
at com.intellij.openapi.application.WriteAction.lambda$runAndWait$2(WriteAction.java:115)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:935)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:961)
at com.intellij.openapi.application.WriteAction.compute(WriteAction.java:96)
at com.intellij.openapi.application.WriteAction.lambda$computeAndWait$3(WriteAction.java:149)
at com.intellij.openapi.application.WriteThread.lambda$submit$0(WriteThread.java:27)
at com.intellij.openapi.application.WriteThread.lambda$submit$1(WriteThread.java:43)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLaterOnWriteThread$10(ApplicationImpl.java:794)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Suppressed: java.lang.RuntimeException
at com.intellij.openapi.application.WriteAction.computeAndWait(WriteAction.java:158)
at com.intellij.openapi.application.WriteAction.computeAndWait(WriteAction.java:128)
at com.intellij.openapi.application.WriteAction.runAndWait(WriteAction.java:114)
at com.intellij.workspaceModel.ide.impl.jps.serialization.JpsProjectModelSynchronizer.applyLoadedStorage(JpsProjectModelSynchronizer.kt:209)
at com.intellij.workspaceModel.ide.impl.jps.serialization.JpsProjectModelSynchronizer.loadProject(JpsProjectModelSynchronizer.kt:229)
at com.intellij.workspaceModel.ide.impl.jps.serialization.DelayedProjectSynchronizer.runActivity(DelayedProjectSynchronizer.kt:23)
at com.intellij.ide.startup.impl.StartupManagerImpl.runStartupActivity(StartupManagerImpl.kt:312)
at com.intellij.ide.startup.impl.StartupManagerImpl.runActivityAndMeasureDuration(StartupManagerImpl.kt:293)
at com.intellij.ide.startup.impl.StartupManagerImpl.runActivityAndMeasureDuration$default(StartupManagerImpl.kt:288)
at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$1$1.run(StartupManagerImpl.kt:245)
at com.intellij.openapi.project.DumbServiceImpl.runWithWaitForSmartModeDisabled(DumbServiceImpl.java:645)
at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$1.accept(StartupManagerImpl.kt:244)
at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$1.accept(StartupManagerImpl.kt:62)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processWithPluginDescriptor(ExtensionPointImpl.java:299)
at com.intellij.openapi.extensions.ExtensionPointName.processWithPluginDescriptor(ExtensionPointName.java:144)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:239)
at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:62)
at com.intellij.ide.startup.impl.StartupManagerImpl$projectOpened$3$1.run(StartupManagerImpl.kt:189)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:277)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:255)
at com.intellij.ide.startup.impl.StartupManagerImpl$projectOpened$3.run(StartupManagerImpl.kt:189)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
And also another dialog box appears as
Unable to save settings
Failed to save settings. Please restart Android Studio
On the top, in the configuration tab, it now shows Add Configuration where it showed app with an android icon previously.
The project explorer keeps on loading forever. The same problem occurs whenever I try to create a new project as well.
There is no modules.xml file and some folders in the .idea folder are missing which the previous projects have.
What I have tried so far
Invalidated caches and Restarted
Deleted .idea and .app folder and restarted
Created a new project to check if the same error occurs
Uninstalled and reinstalled Android studio
Clicked on Repair IDE and followed the steps
Installed previous android studio versions and checked
But none the above steps seem to help resolve the issue.
I know it's an old post, but it's relating to a similar issue and might still be of use:
Android Studio - Gradle sync failed: Already disposed
As stated,
As it turned out, the problem was that I was trying to open a project directory that was a symlink to the actual location (on the same partition). Gradle (on command line) had no issues building the project from the symlinked location, however, opening it in Android Studio resulted in the obscure and non helpful error described above.
Also, some have reported this worked for them:
Delete module folder and modules.xml file under .idea folder.
Close Android Studio
Reopen and sync
So it might effectively be because your module.xml file is missing
For me what helped was (ignoring the root cause of this issue)
removing the project from my local machine
and cloning it again. Then reopening it in AS.
I am on Mac btw.
(Try to restart AS (or Intelli) and clear cache first, before doing this.)
Basically:
Close Android Studio
rm -rf Project-Directory
git clone via commandline (or AS, both works)
reopen AS and import project
Since I don't have time to fiddle around with all the possible options
that you find on the net, to fix this issue, this was the fasted approach.

Unable to choose "Show Diff" option in Android Studio Chipmunk

I am using Android Studio Chipmunk | 2021.2.1 build and facing an unusual error with choosing option "Show Diff" from Git section at bottom.
How to reproduce :
Open Android Studio
Find Git option at the bottom
Now choose any branch from the console
Select any commit
Try opening the changed file(by using double-click or right click and choose "Show Diff") to see the difference made in that commit
Error : The file doesn't open.
This issue was not there before updating Android Studio Chipmunk .I can't say if it is related to Android Studio or most probably something on my end is broken, but if you know anything about it, let me know!
Working Alternative : I am able to open it if I choose "Show Diff in a New Tab" by right clicking on the file.
Edit 1: This is the log error I am getting
java.lang.Throwable: Assertion failed
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:218)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:227)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.<init>(TextEditorComponent.java:76)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:107)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:85)
at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.<init>(TextEditorImpl.java:52)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.<init>(PsiAwareTextEditorImpl.java:36)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:31)
at com.android.tools.idea.uibuilder.editor.multirepresentation.sourcecode.SourceCodeEditorProvider.createEditor(SourceCodeEditorProvider.kt:91)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4Edt(FileEditorManagerImpl.java:997)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl4$17(FileEditorManagerImpl.java:969)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.runBulkTabChange(FileEditorManagerImpl.java:1786)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl4$18(FileEditorManagerImpl.java:968)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:438)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:456)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:965)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl2$14(FileEditorManagerImpl.java:891)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:162)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:148)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:890)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:764)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:731)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:719)
at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:132)
at com.intellij.openapi.vcs.changes.VcsEditorTabFilesManager.openFile(VcsEditorTabFilesManager.kt:75)
at com.intellij.openapi.vcs.changes.VcsEditorTabFilesManager.openFile(VcsEditorTabFilesManager.kt:60)
at com.intellij.openapi.vcs.changes.EditorTabDiffPreviewManager.showDiffFile(EditorTabDiffPreviewManager.kt:38)
at com.intellij.openapi.vcs.changes.EditorTabPreview$Companion.openPreview(EditorTabPreview.kt:173)
at com.intellij.vcs.log.ui.frame.EditorDiffPreview.openPreviewInEditor(VcsLogDiffPreview.kt:136)
at com.intellij.vcs.log.ui.frame.EditorDiffPreview.setPreviewVisible(VcsLogDiffPreview.kt:125)
at com.intellij.openapi.vcs.changes.EditorTabDiffPreviewManager.showDiffPreview(EditorTabDiffPreviewManager.kt:42)
at com.intellij.openapi.vcs.changes.ui.ChangesBrowserBase.showDiff(ChangesBrowserBase.java:272)
at com.intellij.openapi.vcs.changes.ui.ChangesBrowserBase.onDoubleClick(ChangesBrowserBase.java:192)
at com.intellij.openapi.vcs.changes.ui.ChangesTree.lambda$setDoubleClickAndEnterKeyHandler$3(ChangesTree.java:256)
at com.intellij.openapi.vcs.changes.ui.ChangesTreeHandlers$createDoubleClickListener$1.onDoubleClick(ChangesTreeHandlers.kt:52)
at com.intellij.ui.DoubleClickListener.onClick(DoubleClickListener.java:30)
at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:59)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6652)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:394)
at java.desktop/java.awt.Component.processEvent(Component.java:6417)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2784)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:885)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:814)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:751)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:441)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:825)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:440)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:794)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
You can (as workaround) select two any commits in the tree, right-click and "Compare versions". The changes window will opened. Then you will be able open any file-diff by double-click or Ctrl+D.

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.

Android Studio: Need a java compiler

I am getting an error while trying to run an android application. I am running android studio 0.3.2 on Windows 8 64-bit.
Here's the error
java: System Java Compiler was not found in classpath:
java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:79)
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:375)
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:278)
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:190)
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:162)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1087)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:798)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:846)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:761)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:582)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:343)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:224)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
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:744)
Help appreciated!
As people suggested in comments, you should install JDK.
To maintain the difference, refer to: What is the difference between JDK and JRE?.
There are a lot of guides on the internet but the easiest way to install JDK is to visit Oracle Downloads page and install the required one.
After installing read official guide how to set up environment.
Also, this question is answered in SO: How to set JAVA_HOME on Windows 7?
After this, Intellij IDEA (Android Studio) will fetch JDK automatically.
If not, go to Project Structure and set up JDK path manually:

Unable to create a Android project in Android Studio (I/0 Preview) 130.737825 (Mac)

I opened my Android Studio today and it asked to upgrade to the latest version which I did.
Now I am unable to create a new project. I follow the wizard to create a project and it finishes with creating the project, but the result is not what I expected and I get a error in the console
The error I get is:
Can't deserialize target data of key 'IdeaAndroidProject'. Given class loaders: [PluginClassLoader[org.jetbrains.android, 10.0]]: Can't deserialize target data of key 'IdeaAndroidProject'. Given class loaders: [PluginClassLoader[org.jetbrains.android, 10.0]]
java.lang.IllegalStateException: Can't deserialize target data of key 'IdeaAndroidProject'. Given class loaders: [PluginClassLoader[org.jetbrains.android, 10.0]]
at com.intellij.openapi.externalSystem.model.DataNode.prepareData(DataNode.java:159)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.ensureTheDataIsReadyToUse(ProjectDataManager.java:110)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:80)
at com.intellij.openapi.externalSystem.service.project.wizard.AbstractExternalProjectImportBuilder$1$1$1.run(AbstractExternalProjectImportBuilder.java:140)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.mergeRootsChangesDuring(ProjectRootManagerImpl.java:314)
at com.intellij.openapi.externalSystem.service.project.wizard.AbstractExternalProjectImportBuilder$1$1.run(AbstractExternalProjectImportBuilder.java:137)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$6$1.run(ExternalSystemApiUtil.java:323)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1002)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$6.run(ExternalSystemApiUtil.java:320)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2003)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeOnEdt(ExternalSystemApiUtil.java:340)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:318)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:314)
at com.intellij.openapi.externalSystem.service.project.wizard.AbstractExternalProjectImportBuilder$1.run(AbstractExternalProjectImportBuilder.java:134)
at com.intellij.ide.startup.impl.StartupManagerImpl$7.run(StartupManagerImpl.java:286)
at com.intellij.ide.startup.impl.StartupManagerImpl.runActivities(StartupManagerImpl.java:259)
at com.intellij.ide.startup.impl.StartupManagerImpl.access$100(StartupManagerImpl.java:52)
at com.intellij.ide.startup.impl.StartupManagerImpl$4.run(StartupManagerImpl.java:183)
at com.intellij.openapi.project.DumbServiceImpl.runWhenSmart(DumbServiceImpl.java:94)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.java:177)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4$2.run(ProjectManagerImpl.java:439)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
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:686)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:514)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:339)
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)
Caused by: java.io.InvalidClassException: com.android.build.gradle.internal.model.ArtifactInfoImpl; local class incompatible: stream classdesc serialVersionUID = 8019119530161366598, local class serialVersionUID = 4262527033625760143
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:570)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1599)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:979)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:478)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.readObject(ProtocolToModelAdapter.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:979)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at com.intellij.openapi.externalSystem.model.DataNode.prepareData(DataNode.java:155)
... 37 more
When I try to import it does the same thing.
I must ask you for your Android Studio Build number and your system environment. But I think the following step may help. And sorry for poor English if there is any spell mistake.
Under Windows 7 x64
Android Studio 130.737825
First,check your Android Studio version . I have the problem when the version is 130.737825 . Anyway update Android Studio. "Help->Check for Update"
if it didn't work.
http://tools.android.com/recent
to check the newest Build Number or
http://dl.google.com/android/studio/patches/updates.xml
check the newest version .
Download Update package
like this one https://dl.google.com/android/studio/patches/AI-130.737825-132.821530-patch-win.jar
Please according to your own situation choose to down the right one. The format is AI-$FROM-$TO-patch-win.jar $From is the build number your Android studio. $TO is the newest build number you want to update.
Download the package to your Android Studio directory. D:\Android\android-studio.
Run cmd
D:\Android\android-studio>java -classpath AI-130.737825-132.821530-patch-win.jar com.intellij.updater.Runner install .
Moving my projects to the same partition as my Android Studio seems to have solved my problem.
Not a permanent solution but if you want to continue with your work before they fix it, you've got to do it...
I have this error, is your user folder located on a drive other than where android studio is installed?
I would've put this as a comment but can't.
I had the same issue on Win7-x64. I had put path to jdk (c:\Program Files\Java\jdk1.7.0_40) for JAVA_HOME (goto Control Panel->System->Environment Variable) in double quotes. Removing the quotes fixes the issue.
On Ubuntu 13.10 x86_64, updating (to v. 0.3.1 at the time of this writing) also fixed the problem.
To update, as some already listed, just click on "Help -> Check for Update".
As shell said:
WARNING: You are launching the IDE using OpenJDK Java runtime.
ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES!
SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS!
NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed
please validate either STUDIO_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
See http://www.jetbrains.com/help/phpstorm/installation-guide.html?section=Windows#h2linux for more info on switching default JDK.
I think this is the problem. You must switch android-studio's jdk to the right path.

Categories

Resources