xml – 在V7工具栏上没有这样的方法错误

前端之家收集整理的这篇文章主要介绍了xml – 在V7工具栏上没有这样的方法错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。



这个问题很奇怪的是,当我在使用我的应用程序时,一切都很好,因为我去睡觉.然后我醒来,这个错误出现在具有工具栏的所有XML文件中.我已经不了了我没有运气的具体的“没有这种方法”的错误.这是堆栈跟踪:
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.support.v7.widget.TintManager.getDrawable(TintManager.java:180)
at android.support.v7.widget.TintManager.getDrawable(TintManager.java:168)
at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:62)
at android.support.v7.widget.Toolbar.<init>(Toolbar.java:257)
at android.support.v7.widget.Toolbar.<init>(Toolbar.java:199)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:465)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:176)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:247)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:171)
at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:157)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:902)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:854)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:317)
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 org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:654)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:82)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:596)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:591)
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版本的预览来摆脱错误;我注意到,Android Studio喜欢不时地自己调整这些设置,这一次它被设置为API 24(牛轧糖).

原文链接:https://www.f2er.com/xml/292925.html

猜你在找的XML相关文章