XML : Android IDE issue arises when I try to move layouts within tabHost

So I'm currently working on an app, but to do so I am trying to work on multiple layouts within a tabHost. When I try to reorder the layouts within the tabHost it creates an IDE error, and then fails to render. I am experienced with java, but this is my first attempt at working with Android Studio.

Here's the error

  Execute command  ActiveTool: com.intellij.designer.designSurface.tools.SelectionTool@3e7bfc0b  SDK: Android 6.0 - API 23  java.lang.ArrayIndexOutOfBoundsException: 0  at com.intellij.android.designer.model.RadViewComponent.updateTag(RadViewComponent.java:105)  at com.intellij.android.designer.model.RadViewComponent.updateTag(RadViewComponent.java:105)  at com.intellij.android.designer.model.RadComponentOperations$1.run(RadComponentOperations.java:96)  at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931)  at com.intellij.android.designer.model.RadComponentOperations.moveComponent(RadComponentOperations.java:80)  at com.intellij.android.designer.designSurface.AbstractEditOperation.execute(AbstractEditOperation.java:49)  at com.intellij.android.designer.designSurface.TreeDropToOperation.execute(TreeDropToOperation.java:34)  at com.intellij.designer.componentTree.TreeEditOperation.execute(TreeEditOperation.java:113)  at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel.execute(AndroidDesignerEditorPanel.java:1000)  at com.intellij.designer.designSurface.DesignerEditorPanel$DesignerToolProvider$3.run(DesignerEditorPanel.java:1004)  at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124)  at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)  at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)  at com.intellij.designer.designSurface.DesignerEditorPanel$DesignerToolProvider.execute(DesignerEditorPanel.java:1002)  at com.intellij.designer.componentTree.TreeDropListener.executeCommand(TreeDropListener.java:265)  at com.intellij.designer.componentTree.TreeDropListener.drop(TreeDropListener.java:91)  at java.awt.dnd.DropTarget.drop(DropTarget.java:455)  at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:538)  at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:852)  at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:776)  at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:48)  at java.awt.Component.dispatchEventImpl(Component.java:4736)  at java.awt.Container.dispatchEventImpl(Container.java:2292)  at java.awt.Component.dispatchEvent(Component.java:4703)  at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)  at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4611)  at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4457)  at java.awt.Container.dispatchEventImpl(Container.java:2278)  at java.awt.Window.dispatchEventImpl(Window.java:2750)  at java.awt.Component.dispatchEvent(Component.java:4703)  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)  at java.awt.EventQueue.access$500(EventQueue.java:97)  at java.awt.EventQueue$3.run(EventQueue.java:709)  at java.awt.EventQueue$3.run(EventQueue.java:703)  at java.security.AccessController.doPrivileged(Native Method)  at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)  at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)  at java.awt.EventQueue$4.run(EventQueue.java:731)  at java.awt.EventQueue$4.run(EventQueue.java:729)  at java.security.AccessController.doPrivileged(Native Method)  at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)  at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)  at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)  at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:565)  at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)  at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)    

And the rendering software says

  Exception raised during rendering: mBaselineAlignedChildIndex of  LinearLayout points to a View that doesn't know how to get its baseline.    

Any help would be appreciated, and I don't think the XML file is important but here it is anyway

  <?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="match_parent"  android:layout_height="match_parent"  tools:context="org.rtsd.morningtalk.MainActivity"  android:orientation="vertical">    <TabHost      android:layout_width="fill_parent"      android:layout_height="fill_parent"      android:id="@+id/tabHost">        <LinearLayout          android:layout_width="match_parent"          android:layout_height="match_parent"          android:orientation="vertical">            <TabWidget              android:id="@android:id/tabs"              android:layout_width="match_parent"              android:layout_height="wrap_content"></TabWidget>            <FrameLayout              android:id="@android:id/tabcontent"              android:layout_width="match_parent"              android:layout_height="match_parent">                <LinearLayout                  android:layout_width="match_parent"                  android:layout_height="match_parent"                  android:id="@+id/tabCreator"                  android:orientation="vertical">                    <EditText                      android:layout_width="match_parent"                      android:layout_height="wrap_content"                      android:id="@+id/txtName"                      android:layout_gravity="center_horizontal"                      android:hint="Name of the Alarm" />                    <TimePicker                      android:layout_width="wrap_content"                      android:layout_height="wrap_content"                      android:id="@+id/timePicker"                      android:layout_gravity="center_horizontal" />                    <CheckBox                      android:layout_width="wrap_content"                      android:layout_height="wrap_content"                      android:text="Repeat Daily"                      android:id="@+id/rDaily"                      android:checked="false"                      android:layout_marginLeft="15dp" />                    <LinearLayout                      android:orientation="horizontal"                      android:layout_width="match_parent"                      android:layout_height="match_parent">                        <CheckBox                          android:layout_width="wrap_content"                          android:layout_height="wrap_content"                          android:text="Repeat Weekly"                          android:id="@+id/rWeekly"                          android:layout_marginLeft="15dp"                          android:checked="false" />                        <Button                          style="?android:attr/buttonStyleSmall"                          android:layout_width="wrap_content"                          android:layout_height="wrap_content"                          android:text="Create Alarm"                          android:id="@+id/buttonAdd"                          android:layout_marginLeft="90dp"                          tools:ignore="HardcodedText" />                  </LinearLayout>              </LinearLayout>                <LinearLayout                  android:orientation="vertical"                  android:layout_width="match_parent"                  android:layout_height="match_parent"                  android:id="@+id/tabList"></LinearLayout>                <LinearLayout                  android:orientation="vertical"                  android:layout_width="match_parent"                  android:layout_height="match_parent"                  android:id="@+id/tabClock"></LinearLayout>                <LinearLayout                  android:orientation="vertical"                  android:layout_width="match_parent"                  android:layout_height="match_parent"                  android:id="@+id/tabInfo"></LinearLayout>            </FrameLayout>      </LinearLayout>  </TabHost>  </LinearLayout>    

Thanks

No comments:

Post a Comment