所有项目中都有ClassNotFoundException

时间:2015-05-10 03:11:22

标签: android

我在每个项目的xml预览中都有例外,甚至是新项目! 实际上我在堆栈中尝试了很多解决方案,但没有一个能与我合作!

java.lang.ClassNotFoundException: android.support.v4.view.ViewPropertyAnimatorListener
at org.jetbrains.android.uipreview.ModuleClassLoader.load(ModuleClassLoader.java:127)
at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:53)
at org.jetbrains.android.uipreview.ModuleClassLoader.findClass(ModuleClassLoader.java:84)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)
at java.lang.Class.getConstructor0(Class.java:2895)
at java.lang.Class.getConstructor(Class.java:1731)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:348)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:177)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:214)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:142)
at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at com.android.layoutlib.bridge.bars.BridgeActionBar.<init>(BridgeActionBar.java:84)
at com.android.layoutlib.bridge.bars.AppCompatActionBar.<init>(AppCompatActionBar.java:56)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.createActionBar(RenderSessionImpl.java:1691)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:362)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:321)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:497)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:485)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:894)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:485)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:590)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:644)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:79)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:581)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
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:745)

我已经将sdk更新到最新版本以及工作室,但我不知道问题出在哪里!

1 个答案:

答案 0 :(得分:8)

检查此解决方案听起来像是相同/类似的问题: https://stackoverflow.com/a/29993270/1715829

相关部分复制到此处:

  

有完全相同的问题。我通过将<!-- Base application theme. --> <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> </style> 更改为

来摆脱它
USING