When I try to preview an XML layout file containig the latest AdView custom view I get the following error over top of the preview screen:
java.lang.VerifyError: Expecting a stackmap frame at branch target 77
Exception Details:
Location:
com/google/android/gms/ads/AdView.onLayout(ZIIII)V @9: ifnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 2a03 b600 153a 0619 06c6 0044 1906 b600
0000010: 0b10 089f 003a 1906 b600 0a36 0719 06b6
0000020: 0009 3608 1504 1c64 1507 6405 6c36 0915
0000030: 051d 6415 0864 056c 360a 1906 1509 150a
0000040: 1509 1507 6015 0a15 0860 b600 0cb1
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)
at java.lang.Class.getConstructor0(Class.java:2842)
at java.lang.Class.getConstructor(Class.java:1718)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:310)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:100)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:172)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:135)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:755)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:373)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:399)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:336)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:332)
at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:560)
at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:549)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:549)
at com.android.tools.idea.rendering.RenderService.render(RenderService.java:622)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:586)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1900(AndroidLayoutPreviewToolWindowManager.java:80)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6$1.run(AndroidLayoutPreviewToolWindowManager.java:528)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6.run(AndroidLayoutPreviewToolWindowManager.java:523)
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:327)
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)
--------------------------------------------------
If I change the version from .5+ to .4+ the error goes away. My development platform consists of :
- Windows 7 pro (with latest updates, et. al)
- Intellij Community Edition 13.03
- building against Android SDK 19.x
--------------------------------------------------------------------
I don't receive any errors while running either my app or the sample apps on a device or using emulators. This error only occurs while writing and attempting to preview XML layout files that contain the custom view, com.google.android.gms.ads.AdView. In addition, this preview error occurs with all of the sample code I have tried as well as my own, in short any XML layout file that contains the custom view, com.google.android.gms.ads.AdView, and includes the latest Google Play Services SDK, com.google.android.gms:play-services:5.+.
While I can work around the problem during development by using the previous version of Google Play Services, I will eventually have to build and test against the latest version of Google Play Services and I can only hope that this is simply an XML layout preview issue. It would be nice if it worked during preview just like that previous version does.
Thanks for your help.
Sincerely,
Gail Smith