i cant create any XML file in "IntelliJ IDEA 2024.3.1.1 (Community Edition)"

Answered

From the last update of the program, i cant create any XML from Right button -> New -> Value Resource File / Layout / etc
 

Or any layout, etc…always says “Template not found: -----.xml”.

How to fix this?

0
17 comments

Could you please share a video to demonstrate the whole process of the video(Including creating the template) and the zipped log folder(Help | Collect Logs and Diagnostic Data) here (https://uploads.jetbrains.com/) and let us know the upload id?

0

the video: Upload id: 2024_12_23_E13LqDoXi9aouHnptFBJPZ (file: 20241223_202733.mp4)

0

Cicklow Thank you for sharing the video. When you navigate to “New | Edit File Templates”, do you see the concerned template named “Values Resources File”? If no, does it help by creating a new one with the same name? I created one just for testing purpose, and it works. If the issue still persists, please share the log here or in a new ticket in YouTrack (https://youtrack.jetbrains.com/issues) for further troubleshooting.

 

0

i don't have that option… Before the update it worked fine, why did I have to create the internal program templates?

0

In that case, please navigate to “File | Settings | Editor | File and Code Templates” and see if there is any existing template named “Values Resources File”. If yes, perform a “File | Invalidate Caches” and see how it goes. If it doesn't help, backup the content of the template and recreate it. 

If it doesn't exist, the template needs to be recreated with the desired content, this is not an internal/integrated template in my environment, I need to create it first to be able to see the option from “New” dropdown list.

1

“Invalidate Caches” fixed it for me.

1

the file exits, but its empty.. and invalidate cache don't work…

0

Cicklow It is still could be a cache issue, for some reason the file is not loaded well or corrupted. If invalidating cache(with all the options checked), please consider re-creating the template.

0

invalidate all cache dont work…and recreate?… 

I couldn't recreate the template, intellij doesn't enable the option for that, and even if I could do it, I wouldn't have the content of the template. You can see the previous image… the + (plus to add) its disabled.!

0

Cicklow Have you tried re-installing the IDE? It feels like something is broken there. For issue isolation purpose, please disable all non-bundled plugins via “Settings | Plugins | ⚙ | Disable all downloaded plugins”, restart the IDE and see how it goes. If that is not helpful, reinstall the IDE. If it still persists after that, please file a ticket in https://youtrack.jetbrains.com/issues with the zipped log folder (Help | Collect Logs and Diagnostic Data) attached there.

0

1- if i disable all plugin, can't create the file from template…

2- i try to uninstall and the program say “cant encounter uninstall.exe”… and i run that exe… -.-'

3- i rename the folder of the instalation, and reinstall in a new folder, and have the same problem…

 

this start when i update the program… before the update all work fine…

0

Cicklow Have you tried removing the previous installation totally by clearing below directories as well?

Configuration directory

System directory

Plugins directory

If the issue still persists afterwards, it is hard to explain the behavior from the IDE perspective as that would be a fresh new installation without any customizations. Perhaps there are some underlying issues with the local file system. If possible, please consider testing the same from another machine.

0

don't work… i delete all folder, install again, configure SDK, JDK and Gradle, and get the same error!…

0

Cicklow I appreciate all your efforts so far in trying to solve this issue. However it is hard to troubleshoot it further just from here.  Please file a ticket in https://youtrack.jetbrains.com/issues with the zipped log folder (Help | Collect Logs and Diagnostic Data) attached there.

0

I have the same problem since version 2024.3 in both community and ultimate versions, also I have tested on windows and linux(installations on freshly installed operating systems) version 2024.2.5 works without problems

This is the error in my logs:

2025-01-07 15:53:18,932 [ 881902]   INFO - #c.i.i.a.ElementCreator - Template not found: layoutResourceFile.xml
java.lang.IllegalStateException: Template not found: layoutResourceFile.xml
    at com.intellij.ide.fileTemplates.impl.FileTemplateManagerImpl.getTemplateFromManager(FileTemplateManagerImpl.java:284)
    at com.intellij.ide.fileTemplates.impl.FileTemplateManagerImpl.getJ2eeTemplate(FileTemplateManagerImpl.java:271)
    at com.android.tools.idea.res.IdeResourcesUtil.createFileResource(IdeResourcesUtil.kt:2220)
    at org.jetbrains.android.actions.CreateTypedResourceFileAction.doCreateAndNavigate(CreateTypedResourceFileAction.java:130)
    at org.jetbrains.android.actions.CreateResourceFileAction.create(CreateResourceFileAction.java:292)
    at org.jetbrains.android.actions.CreateResourceActionBase$MyInputValidator.create(CreateResourceActionBase.java:146)
    at com.intellij.ide.actions.ElementCreator.lambda$tryCreate$0(ElementCreator.java:46)
    at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:85)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:389)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:383)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:906)
    at com.intellij.openapi.application.WriteAction.run(WriteAction.java:84)
    at com.intellij.ide.actions.ElementCreator.lambda$executeCommand$1(ElementCreator.java:64)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:226)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168)
    at com.intellij.ide.actions.ElementCreator.executeCommand(ElementCreator.java:60)
    at com.intellij.ide.actions.ElementCreator.tryCreate(ElementCreator.java:45)
    at org.jetbrains.android.actions.CreateResourceActionBase$MyInputValidator.canClose(CreateResourceActionBase.java:156)
    at org.jetbrains.android.actions.CreateResourceFileDialog.doOKAction(CreateResourceFileDialog.java:285)
    at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1963)
    at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1914)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
    at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2314)
    at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:407)
    at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
    at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
    at java.desktop/javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicRootPaneUI.java:259)
    at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
    at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2956)
    at java.desktop/javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:309)
    at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:251)
    at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:3049)
    at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:3041)
    at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2918)
    at java.desktop/java.awt.Component.processEvent(Component.java:6398)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
    at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1952)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:883)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1146)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1020)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:848)
    at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent$lambda$1(IdeKeyboardFocusManager.kt:48)
    at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent$lambda$2(IdeKeyboardFocusManager.kt:54)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
    at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.kt:54)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4877)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675)
    at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:609)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$22(IdeEventQueue.kt:565)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:565)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
    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.pumpEventsForFilter(EventDispatchThread.java:117)
    at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:191)
    at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:236)
    at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:234)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
    at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:234)
    at java.desktop/java.awt.Dialog.show(Dialog.java:1079)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:890)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:472)
    at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1772)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1721)
    at com.intellij.openapi.ui.DialogWrapper.showAndGet(DialogWrapper.java:1735)
    at org.jetbrains.android.actions.CreateResourceFileAction.invokeDialog(CreateResourceFileAction.java:231)
    at org.jetbrains.android.actions.CreateMultiRootResourceFileAction.invokeDialog(CreateMultiRootResourceFileAction.java:60)
    at org.jetbrains.android.actions.CreateResourceActionBase.actionPerformed(CreateResourceActionBase.java:85)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.kt:374)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks$lambda$7(ActionUtil.kt:343)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1173)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.kt:342)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction$lambda$5(ActionMenuItem.kt:273)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:231)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.kt:265)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem._init_$lambda$0(ActionMenuItem.kt:72)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed$lambda$4(ActionMenuItem.kt:103)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:98)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.kt:102)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:521)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:554)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6621)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
    at java.desktop/java.awt.Component.processEvent(Component.java:6386)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:621)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$21(IdeEventQueue.kt:564)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:564)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:117)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
    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)2025-01-07 15:53:18,932 [ 881902]   INFO - #c.i.i.a.ElementCreator - Template not found: layoutResourceFile.xml
0

Cicklow Thank you for creating below ticket previously, our team has identified it and now it is being investigated.

https://youtrack.jetbrains.com/issue/IDEA-365164/Android-Cant-create-new-resource-file-from-template-Template-not-found

 

0

in “IntelliJ IDEA 2024.3.5 (Community Edition)” continue with the problem… so i desist and install Android Studio, and don't have this problem!

0

Please sign in to leave a comment.