I have correctly setup Erlang under "Internal Elrang SDKSs", however it doesn't seem to like Elixir:
Probably SDK installed in '/home/brian/.asdf/installs/elixir/1.7.3' is corrupt
When I select OK it says:
Unknown Elixir version at /home/brian/.asdf/installs/elixir/1.7.3
Maybe this is an issue with Elxir 1.7.3?
I could do it just fine using 1.7.3:


I can't see why Linux asdf would work differently than macOS asdf, but maybe? So, to confirm:
I just noticed this exception from the plugin. Will try to see if this is related:
java.lang.Throwable: Assertion failed: Write access is allowed inside write-action only (see com.intellij.openapi.application.Application.runWriteAction())
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.assertWriteAccessAllowed(ApplicationImpl.java:1339)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase.a(LibraryTableBase.java:170)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase.access$600(LibraryTableBase.java:29)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryModel.commit(LibraryTableBase.java:224)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase.removeLibrary(LibraryTableBase.java:165)
at org.elixir_lang.facet.sdks.Configurable$addListeners$listener$1.beforeSdkRemove(Configurable.kt:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:99)
at com.intellij.util.EventDispatcher.access$200(EventDispatcher.java:35)
at com.intellij.util.EventDispatcher$2.invoke(EventDispatcher.java:79)
at com.sun.proxy.$Proxy64.beforeSdkRemove(Unknown Source)
at com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectSdksModel.removeSdk(ProjectSdksModel.java:218)
at org.elixir_lang.facet.sdks.Configurable.removeSdk(Configurable.kt:176)
at org.elixir_lang.facet.sdks.Configurable.access$removeSdk(Configurable.kt:33)
at org.elixir_lang.facet.sdks.Configurable$createComponent$decorator$2.run(Configurable.kt:70)
at org.elixir_lang.facet.sdks.Configurable$createComponent$decorator$2.run(Configurable.kt:69)
at com.intellij.ui.ToolbarDecorator$2.doRemove(ToolbarDecorator.java:454)
at com.intellij.ui.CommonActionsPanel$Buttons.performAction(CommonActionsPanel.java:60)
at com.intellij.ui.CommonActionsPanel$MyActionButton.actionPerformed(CommonActionsPanel.java:266)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:204)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:146)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:391)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:781)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:718)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1077)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:698)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:430)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1690)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1639)
at com.intellij.openapi.options.newEditor.SettingsDialog.a(SettingsDialog.java:72)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:153)
at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:72)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:97)
at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:63)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:52)
at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame$FlatWelcomeScreen$IconsFreeActionGroup$1.actionPerformed(FlatWelcomeFrame.java:724)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
at com.intellij.ui.popup.ActionPopupStep.performAction(ActionPopupStep.java:203)
at com.intellij.ui.popup.ActionPopupStep.performAction(ActionPopupStep.java:191)
at com.intellij.ui.popup.ActionPopupStep.a(ActionPopupStep.java:185)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1417)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:3097)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:183)
at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:132)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:190)
at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1411)
at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:160)
at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:307)
at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.dispose(PopupFactoryImpl.java:289)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:48)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:138)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:107)
at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:182)
at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:107)
at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:151)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:129)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:125)
at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:263)
at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:442)
at com.intellij.ui.popup.list.ListPopupImpl.a(ListPopupImpl.java:396)
at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:342)
at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.handleSelect(PopupFactoryImpl.java:309)
at com.intellij.ui.popup.list.ListPopupImpl$MyMouseListener.mouseReleased(ListPopupImpl.java:501)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6548)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at com.intellij.ui.popup.list.ListPopupImpl$MyList.processMouseEvent(ListPopupImpl.java:552)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:781)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:718)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
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)
That exception only happens after removing the dodgy SDK entry. So might not be that important.
Oh, I think I found the problem. It won't work unless you have a global version of erlang set before hand. As in it will try to run elixir without an erlang version set. Possibly not good if you want to use a different erlang version for a specific project. Seems to be working now anyway...
Not seeing a mix project type. Suspect this is an unrelated issue however.
@brianmay mix project type is an IntelliJ IDEA only feature. The single language IDEs, such as PyCharm, can only have ever have projects of their native language (so Python). How alternative languages work in the single-language IDEs is completely ad-hoc. For this plugin, I use the Facet system (which was originally designed to track things like web frameworks) to add Elixir as a Facet under that root Python project, but in Pycharm you're never not going to have a Python project with a Python SDK.
If you're using Pycharm for an Elixir-only project and not a mix of Python and Elixir, you'd be better off using IntelliJ Community Edition, which is free.
Using either version of IntelliJ also has the benefit that your project can have multiple modules. Single-language IDEs have project have only 1 module in the native language. Multiple modules is used to have each OTP app in an umbrella project be a separate module, so that dependencies and Go To work as they should with the correct scoping.
Thanks for the feedback. I really should try IntelliJ, previously I was only aware of PyCharm.
For people still having this problem when using asdf, I found this guy's solution fixed it for me:
Problems with Elixir not being found when installed through asdf #66
In short, you must add . $HOME/.asdf/asdf.sh to your .profile in order for programs (and not just your terminal) to be able to access elixir.
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.profile
Thanks @jonthulu ! Adding asdf to .profile (and restarting IDE/jetbrains-toolbox) fixed it for me echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.profile
The above solution does not work for me using Intellij 2020.3 I still get the dreaded
Probably SDK installed in '/home/daya/.asdf/installs/elixir/1.11.2-otp-23' is corrupt
Java version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.10)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.10, mixed mode, sharing)
Ubuntu
NAME="Ubuntu"
VERSION="20.10 (Groovy Gorilla)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.10"
VERSION_ID="20.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=groovy
UBUNTU_CODENAME=groovy
Most helpful comment
For people still having this problem when using asdf, I found this guy's solution fixed it for me:
Problems with Elixir not being found when installed through asdf #66
In short, you must add
. $HOME/.asdf/asdf.shto your.profilein order for programs (and not just your terminal) to be able to access elixir.