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!
Please sign in to leave a comment.
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.
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
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 .
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:
>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
See https://www.jetbrains.com/idea/help/intellij-idea-tool-windows.html .
Preview is a tool window.
>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
See the screenshot:
>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
>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
>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
Understood.
Thank you very much!