Hi I am developing application .My application run perfectly on all devices.But when we run this application on mdpi phone its getting me this error:
Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x12.
Kindly help me where i am wrong.
This is My Code:-
<RelativeLayout
android:id="@+id/LevLayId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="140dp" >
<TextView
android:id="@+id/totlScorId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@drawable/score_timer"
android:gravity="center"
android:textColor="#ffffff" />
<TextView
android:id="@+id/levelId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/score_timer"
android:gravity="center"
android:textColor="#ffffff" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/LayAboButId"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/option_last_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="7px"
android:orientation="horizontal" >
<Button
android:id="@+id/opt3Btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/option_normal_new"
android:gravity="center|center_vertical"
android:textColor="#ffffff"
android:textSize="11dp" />
<Button
android:id="@+id/opt4Btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/option_normal"
android:gravity="center|center_vertical"
android:textColor="#ffffff"
android:textSize="11dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/option_pre_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/option_last_row"
android:layout_marginBottom="3px"
android:orientation="horizontal" >
<Button
android:id="@+id/opt1Btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/option_normal_new"
android:gravity="center|center_vertical"
android:textColor="#ffffff"
android:textSize="11dp" />
<Button
android:id="@+id/opt2Btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/option_normal"
android:gravity="center|center_vertical"
android:textColor="#ffffff"
android:textSize="11dp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/imgLayId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginRight="@id/totlScorId"
android:layout_marginTop="70dp" >
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<ImageView
android:id="@+id/imgViewId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<ImageView
android:id="@+id/imgViewframeId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/photo_frame" />
</RelativeLayout>