在设置渐变期间出错 在drawable中,我有3个.xml文件
1)gradient_bg.xml
android:shape="rectangle">
<gradient
android:startColor="#f1f1f2"
android:centerColor="#e7e7e8"
android:endColor="#cfcfcf"
android:angle="270"></gradient>
2)gradient_bg_hover.xml
<?xml version="1.0" encoding="utf-8"?>
<gradient
android:startColor="#ff50e552"
android:centerColor="#ff78db34"
android:endColor="#88b983"
android:angle="270"></gradient>
和3)list_style.xml
<?xml version="1.0" encoding="utf-8"?>
<item
android:state_selected="false"
android:state_pressed="false"
android:drawable="@drawable/gradient_bg"></item>
<item
android:state_pressed="true"
android:drawable="@drawable/gradient_bg_hover"></item>
//现在我在这里得到psi的错误一定不能改变nad我不知道如何解决
//下面是该错误的完整详情
Must not modify PSI inside save listener com.intellij.util.IncorrectOperationException: Must not modify PSI inside save listener at com.intellij.pom.core.impl.PomModelImpl.runTransaction(PomModelImpl.java:138) at com.intellij.psi.impl.DocumentCommitProcessor$2.run(DocumentCommitProcessor.java:215) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl$8.compute(CodeStyleManagerImpl.java:674) at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:121) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl$10.compute(CodeStyleManagerImpl.java:709) at com.intellij.formatting.FormatterImpl.runWithFormattingDisabled(FormatterImpl.java:894) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.performActionWithFormatterDisabled(CodeStyleManagerImpl.java:705) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.performActionWithFormatterDisabled(CodeStyleManagerImpl.java:671) at com.intellij.psi.impl.DocumentCommitProcessor.doActualPsiChange(DocumentCommitProcessor.java:200) at com.intellij.psi.impl.DocumentCommitProcessor$1.process(DocumentCommitProcessor.java:136) at com.intellij.psi.impl.DocumentCommitProcessor$1.process(DocumentCommitProcessor.java:126) at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommitInWriteAction(PsiDocumentManagerBase.java:322) at com.intellij.psi.impl.PsiDocumentManagerImpl.finishCommitInWriteAction(PsiDocumentManagerImpl.java:133) at com.intellij.psi.impl.PsiDocumentManagerBase$3.run(PsiDocumentManagerBase.java:292) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931) at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommit(PsiDocumentManagerBase.java:289) at com.intellij.psi.impl.DocumentCommitThread$5.run(DocumentCommitThread.java:521) at com.intellij.psi.impl.DocumentCommitThread.commitSynchronously(DocumentCommitThread.java:417) at com.intellij.psi.impl.PsiDocumentManagerBase$5.run(PsiDocumentManagerBase.java:374) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931) at com.intellij.psi.impl.PsiDocumentManagerBase.doCommit(PsiDocumentManagerBase.java:366) at com.intellij.psi.impl.PsiDocumentManagerBase.commitDocument(PsiDocumentManagerBase.java:278) at com.intellij.codeInsight.editorActions.XmlTagNameSynchronizer$TagNameSynchronizer.beforeDocumentChange(XmlTagNameSynchronizer.java:218) at com.intellij.openapi.editor.impl.DocumentImpl.doBeforeChangedUpdate(DocumentImpl.java:760) at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:722) at com.intellij.openapi.editor.impl.DocumentImpl.deleteString(DocumentImpl.java:528) at com.intellij.openapi.editor.impl.DocumentImpl$3.run(DocumentImpl.java:300) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931) at com.intellij.util.DocumentUtil$1.run(DocumentUtil.java:64) at com.intellij.openapi.command.impl.CoreCommandProcessor.runUndoTransparentAction(CoreCommandProcessor.java:296) at com.intellij.util.DocumentUtil.writeInRunUndoTransparentAction(DocumentUtil.java:61) at com.intellij.openapi.editor.impl.DocumentImpl.stripTrailingSpaces(DocumentImpl.java:297) at com.intellij.openapi.editor.impl.TrailingSpacesStripper.stripIfNotCurrentLine(TrailingSpacesStripper.java:177) at com.intellij.openapi.editor.impl.TrailingSpacesStripper.strip(TrailingSpacesStripper.java:80) at com.intellij.openapi.editor.impl.TrailingSpacesStripper.beforeDocumentSaving(TrailingSpacesStripper.java:60) at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.multiCast(FileDocumentManagerImpl.java:159) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.access$000(FileDocumentManagerImpl.java:87) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$1.invoke(FileDocumentManagerImpl.java:116) at com.sun.proxy.$Proxy20.beforeDocumentSaving(Unknown Source) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$4.run(FileDocumentManagerImpl.java:422) at com.intellij.pom.core.impl.PomModelImpl.guardPsiModificationsIn(PomModelImpl.java:354) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.doSaveDocumentInWriteAction(FileDocumentManagerImpl.java:419) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.doSaveDocument(FileDocumentManagerImpl.java:393) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocument(FileDocumentManagerImpl.java:344) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocument(FileDocumentManagerImpl.java:336) at com.android.tools.idea.rendering.LayoutPullParserFactory$2$1.run(LayoutPullParserFactory.java:294) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931) at com.android.tools.idea.rendering.LayoutPullParserFactory$2.run(LayoutPullParserFactory.java:291) at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:161) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332) 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$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) 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: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)