title: application crash when I used layout_toRightOf in android
body: <p><strong>Layout</strong> </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" 
      android:background="#e6e6e6"&gt;
  
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:background="@drawable/headerbar"
           android:padding="10dip" &gt;
  
          &lt;ImageView
              android:id="@+id/imageView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_alignParentTop="true"
              android:layout_marginLeft="10dp"
              android:layout_centerVertical="true"  
            android:src="@drawable/logo" /&gt;
  
          &lt;TextView
              android:id="@+id/textViewtest"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignBottom="@+id/imageView1"
              android:layout_alignParentRight="true"
              android:layout_marginRight="18dp"
              android:text="@string/appsetting"
              android:background="@drawable/pinkbuttonbackground"
              android:layout_centerVertical="true"
              android:padding="5dp"               
              android:textAppearance="@dimen/textfontsize" /&gt;
  
      &lt;/RelativeLayout&gt;
  
         &lt;Button
          android:id="@+id/item_buttonId"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:text="@string/okButton" 
          android:textColor="#ffffff"
          android:background="#be0054"
          android:textStyle="bold" /&gt;
  
      &lt;AutoCompleteTextView
          android:id="@+id/item_autoComplete"
          android:layout_width="150dp"
          android:layout_height="wrap_content"
          android:layout_alignBaseline="@+id/textView1"
          android:textCursorDrawable="@null"
          android:background="@drawable/background_textfield"
          android:singleLine="true"
          android:paddingLeft="2dp"
          android:textColor="#000000" /&gt;
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_marginRight="38dp"
          android:layout_marginTop="84dp"
          android:layout_toLeftOf="@+id/item_autoComplete"
          android:text="@string/chooseStation"
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:textColor="#d70261" /&gt;    
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>![][1]</p>
  
  <p>![enter image description here][2]</p>
  
  <p>my application crash when I write l <strong>android:layout_toRightOf="@+id/textView1"</strong>
  my textView1 is textview name "choose station " actually there is autocomplete field whch is below the textview .I need to shift that on right ..when I used this <strong>android:layout_toRightOf="@+id/textView1"</strong>
  it creash ..
  <strong>here is log</strong></p>
  
  <pre><code>11-01 13:20:56.556: E/AndroidRuntime(2112): FATAL EXCEPTION: main
  11-01 13:20:56.556: E/AndroidRuntime(2112): java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.RelativeLayout$DependencyGraph.getSortedViews(RelativeLayout.java:1286)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.RelativeLayout.sortChildren(RelativeLayout.java:294)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:314)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.View.measure(View.java:12603)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.View.measure(View.java:12603)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.View.measure(View.java:12603)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2072)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.View.measure(View.java:12603)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1044)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.os.Handler.dispatchMessage(Handler.java:99)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.os.Looper.loop(Looper.java:137)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at android.app.ActivityThread.main(ActivityThread.java:4340)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at java.lang.reflect.Method.invokeNative(Native Method)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at java.lang.reflect.Method.invoke(Method.java:511)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  11-01 13:20:56.556: E/AndroidRuntime(2112):     at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p><strong>expected output</strong></p>