Select to view content in your preferred language

Android studio not able to preview mapview layout ?

1528
4
02-14-2017 03:09 AM
KamalAgarwal
Deactivated User

Exception Details :

java.lang.VerifyError: Expecting a stackmap frame at branch target 19
Exception Details:
Location:
com/esri/arcgisruntime/mapping/view/GeoView.<init>(Landroid/content/Context;Landroid/util/AttributeSet;)V @10: ifeq
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: 2a2b 2cb7 001d 2ab6 0021 9900 092a 01b5
0x0000010: 0023 b1b1

at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.getConstructor(Class.java:1825)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:396)
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:186)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:334)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:345)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:245)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)
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:324)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659)
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)

Thanks

0 Kudos
4 Replies
RyanOlson1
Esri Contributor

This is in the iOS forum. It would be best to ask this in the Android SDK forum to get an answer from the Android team. That being said, I will forward this question to some Android team members that I know so hopefully you will get some kind of response.

0 Kudos
KamalAgarwal
Deactivated User

Thanks

0 Kudos
DanO_Neill
Deactivated User

Yes, this should be posted in the Android SDK forum, judging from your title and exception I am assuming you are attempting to view the MapView in layout design view which is not supported.  Can you share your layout xml so we can better review your exception?

0 Kudos
KamalAgarwal
Deactivated User

Here is my XML code

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/relativeLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".Mmpksearch">

    <!-- MapView -->
    <com.esri.arcgisruntime.mapping.view.MapView
        android:id="@+id/mmpkmapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

    </com.esri.arcgisruntime.mapping.view.MapView>

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/mmpkgpsfixer"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:src="@drawable/ic_gps_fixed"
        android:clickable="true"
        android:layout_marginBottom="15dp"/>

    <include
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        layout="@layout/searchview"
        android:id="@+id/floating_searchView"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_margin="20dp" />

</RelativeLayout>
0 Kudos