Error rendering preview of XML layout with <fragment>

Hi,
I have Intellij 14.1,JDK 1.7, JDK 1.7.0_75.
I use Google Maps with fragment tag in layout.
I got the following error rendering preview of my XML layout:
Rendering problems.
Java.lang.stackoverflowError
The app runs okay on Emulator and device.
Other XML layout previews are okay.
My XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:background="@color/backNormal"
              android:orientation="vertical"
        >

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:background="@color/backNormal"
                  android:orientation="horizontal"
                  android:layout_marginTop="5dp"
                  android:layout_marginBottom="5dp"
            >

        <Button
                android:id="@+id/buttonWay"
                android:gravity="center"
                android:text='Start'
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                style="@style/button_style_normal"
                android:layout_marginLeft="2dp"
                android:layout_marginRight="2dp"
                />

    </LinearLayout>
    <fragment
            android:id="@+id/map"
            android:name="com.google.android.gms.maps.MapFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            tools:layout="@layout/page_one"/>

</LinearLayout>

My second question is how to place XML  layout preview
on the right side of screen and int's source  on the left side
simultaneously (just like in IntelliJ 12 version)

Thanks!

 

0
12 comments

Can you post idea.log (https://intellij-support.jetbrains.com/entries/23352446) and a complete sample project to reproduce?

What Android Platform version and build tools version do you use? Does it the issue occur in Android Studio?

Preview tool window and edidor tool window are separate, so there is no problem displaying Editor and Preview at the same time, but you can't display Text and Design at the same time as they are tab views for the Editor.

0

Thank you for reply.
I use intelliJ 14.1 and the  Android SDK 1.7.0_75.
I guess the rendering error does not depend on the project.
I have attached idea.log.
The last operation was attempt to render preview of xml layout fragment.
I got the error again.
Thanks!



Attachment(s):
idea.log.zip
0

Android platform version is not your JDK version.

Also, your sample layout uses styles, colors and fragmets that are required to reproduce the problem, hence the question about an isolated project.

In any case, it looks like an issue with Android SDK and your specific layout file, not IntelliJ IDEA problem.
Android SDK issues should be reported here: https://code.google.com/p/android/issues/list .

0

Okay. Thank you.
I use the latest Android SDK and the latest IntelliJ 14.1
I did not add the following line to my layout:

tools:layout="@layout/page_one"
I even don't understand what does it mean.
After I removed this line preview is shown okay.
But render error message appears again.
It seems I have installed Android SDK
from Android studio, but I use intelliJ with it.
Maybe I have to install
separate Android SDK package?
Perhaps this is the problem of layout preview error?
Thanks.
0

>Preview tool window and edidor tool window are separate,
>so there is no  problem displaying Editor and Preview at the same time,
>but you can't  display Text and Design at the same time as they are tab views for the  Editor.

Sorry, not understood how open preview on the right side of editor screen

0

>preview is a tool window.
I don't see there how to open preview on the right side.
Switching tabs between text and design is extremely uncomfortable.
Thanks

intelliJ1.png

0

See the screenshot:

https://dl.dropboxusercontent.com/u/2752840/ShareXmod/2015-03/2015-03-30_17-50-07.png

0

>preview is a tool window.
I don't see there how to open preview on the right side.
Switching tabs between text and design is extremely uncomfortable.
Thanks



---
Original message URL: https://devnet.jetbrains.com/message/5538464#5538464

0

>preview is a tool window.
I don't see there how to open preview on the right side.
Switching tabs between text and design is extremely uncomfortable.
Thanks



---
Original message URL: https://devnet.jetbrains.com/message/5538471#5538471

0

>preview is a tool window.
I don't see there how to open preview on the right side.
Switching tabs between text and design is extremely uncomfortable.
Thanks



---
Original message URL: https://devnet.jetbrains.com/message/5538473#5538473

0

Understood.
Thank you very much!

0

Please sign in to leave a comment.