plugin did not work with new version of Android studio
bkhezry opened this issue · 1 comments
bkhezry commented
Android studio 3.4 Canary 3
multiple time return this error:
java.lang.NoSuchMethodError:
com.android.ide.common.vectordrawable.VdPreview$TargetSize.createSizeFromWidth(I)Lcom/android/ide/common/vectordrawable/VdPreview$TargetSize;
at com.mistamek.drawablepreview.factories.XmlImageFactory.createXmlImage(XmlImageFactory.kt:27)
at com.mistamek.drawablepreview.factories.IconPreviewFactory.getImage(IconPreviewFactory.kt:54)
at com.mistamek.drawablepreview.factories.IconPreviewFactory.getIcon(IconPreviewFactory.kt:35)
at com.mistamek.drawablepreview.factories.IconPreviewFactory.createIcon(IconPreviewFactory.kt:22)
at com.mistamek.drawablepreview.DrawablePreviewIconProvider.getIcon(DrawablePreviewIconProvider.kt:9)
at com.intellij.util.PsiIconUtil.getProvidersIcon(PsiIconUtil.java:27)
at com.intellij.psi.impl.ElementBase.doComputeIconNow(ElementBase.java:104)
at com.intellij.psi.impl.ElementBase.lambda$computeIconNow$2(ElementBase.java:100)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
at com.intellij.psi.impl.ElementBase.computeIconNow(ElementBase.java:100)
at com.intellij.psi.impl.ElementBase.lambda$static$0(ElementBase.java:44)
at com.intellij.ui.DeferredIconImpl.evaluate(DeferredIconImpl.java:280)
at com.intellij.ui.DeferredIconImpl.lambda$null$0(DeferredIconImpl.java:165)
at com.intellij.ui.IconDeferrerImpl.evaluateDeferred(IconDeferrerImpl.java:109)
at com.intellij.ui.DeferredIconImpl.lambda$null$1(DeferredIconImpl.java:165)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1171)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:70)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:123)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:70)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:91)
at com.intellij.ui.DeferredIconImpl.lambda$paintIcon$4(DeferredIconImpl.java:164)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:227)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:26)
at com.intellij.util.concurrency.BoundedTaskExecutor$2$1.run(BoundedTaskExecutor.java:200)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:229)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
mistamek commented
Hi, thanks for the information. JetBrains changed api for the class working with vector images, while the plugin uses the class that is located at the client. Fixed with reflection (ooouch)