我刚刚安装了Android Studio,我想开始制作Android应用,但我遇到了一个问题: 当我尝试将我的应用程序主题更改为Material Light / Material.Light时出现错误:
(Rendering Problems)
Exception raised during rendering:
android.graphics.drawable.VectorDrawable_Delegate.nCreateTreeFromCopy(JJ)J (Details)
日志:
java.lang.NoSuchMethodError: android.graphics.drawable.VectorDrawable_Delegate.nCreateTreeFromCopy(JJ)J
at android.graphics.drawable.VectorDrawable.nCreateTreeFromCopy(VectorDrawable.java)
at android.graphics.drawable.VectorDrawable.access$400(VectorDrawable.java:204)
at android.graphics.drawable.VectorDrawable$VectorDrawableState.createNativeTreeFromCopy(VectorDrawable.java:837)
at android.graphics.drawable.VectorDrawable$VectorDrawableState.<init>(VectorDrawable.java:812)
at android.graphics.drawable.VectorDrawable.mutate(VectorDrawable.java:268)
at android.graphics.drawable.VectorDrawable.onStateChange(VectorDrawable.java:392)
at android.graphics.drawable.Drawable.setState(Drawable.java:732)
at android.widget.ImageView.updateDrawable(ImageView.java:927)
at android.widget.ImageView.setImageDrawable(ImageView.java:509)
at android.widget.ImageView.<init>(ImageView.java:159)
at android.widget.ImageButton.<init>(ImageButton.java:84)
at android.widget.ImageButton.<init>(ImageButton.java:80)
at android.widget.ActionMenuPresenter$OverflowMenuButton.<init>(ActionMenuPresenter.java:841)
at android.widget.ActionMenuPresenter.initForMenu(ActionMenuPresenter.java:153)
at com.android.internal.view.menu.MenuBuilder.addMenuPresenter(MenuBuilder.java:229)
at android.widget.ActionMenuView.getMenu(ActionMenuView.java:646)
at android.widget.Toolbar.ensureMenu(Toolbar.java:1026)
at android.widget.Toolbar.getMenu(Toolbar.java:997)
at com.android.layoutlib.bridge.bars.FrameworkActionBarWrapper$ToolbarWrapper.getMenuBuilder(FrameworkActionBarWrapper.java:222)
at com.android.layoutlib.bridge.bars.FrameworkActionBarWrapper.inflateMenus(FrameworkActionBarWrapper.java:127)
at com.android.layoutlib.bridge.bars.FrameworkActionBarWrapper$ToolbarWrapper.inflateMenus(FrameworkActionBarWrapper.java:199)
at com.android.layoutlib.bridge.bars.FrameworkActionBar.<init>(FrameworkActionBar.java:85)
at com.android.layoutlib.bridge.impl.Layout.createActionBar(Layout.java:242)
at com.android.layoutlib.bridge.impl.Layout.<init>(Layout.java:152)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:300)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:520)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:508)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:967)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:508)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:75)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:620)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:617)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:371)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:617)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:639)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$7.run(AndroidDesignerEditorPanel.java:519)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327)
at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:352)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
编辑:
我重新安装了Android Studio,制作了一个新项目并选择了API 23.我终于没有错误了。谢谢大家。
答案 0 :(得分:0)
我重新安装了Android Studio,制作了一个新项目并选择了API 23.我终于没有错误了。谢谢你们。你救了我......
答案 1 :(得分:0)
尝试使用Intellij的想法。 Andriod Studio基于它,但Idea尽快更新并具有相同的功能。
答案 2 :(得分:-1)
当我刚开始使用android studio时,我遇到过这个问题。我认为解决这个问题的最快方法就是重新安装它。
另外,不要忘记复制你的项目。