android - "No XML content. Please add a root view or layout to your document." -
i trying follow tutorial : http://developer.android.com/training/basics/firstapp/building-ui.html new android developing , "activity_main.xml" file looks :
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <edittext android:id="@+id/edit_message" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/edit_message" /> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_send" />
when click run error says "no xml content. please add root view or layout document." , noticed there new file generated called "activity_main.out.xml". doing wrong?
you're seeing when have layout (activity_main.xml) open in editor , click "run" button in toolbar. there 2 ways work around this:
- click drop-down next run button , select project list, or
- switch editor code file , click run button.
Comments
Post a Comment