应用程序RCApps(进程com.examples)意外停止

时间:2011-11-09 03:26:36

标签: android

我的应用程序运行正常,但后来我收到错误并尝试重新运行API,清理构建但没有任何效果。当看到logcat错误时发现了两个错误,我可以找到解决方案。以下是错误。

11-08 21:50:09.981:ERROR / AndroidRuntime(352):引起:java.lang.ClassNotFoundException:loader dalvik.system.PathClassLoader中的android.view.Relativelayout [/data/app/com.examples- 1.apk]

11-08 21:50:09.981:ERROR / AndroidRuntime(352):引起:android.view.InflateException:二进制XML文件行#2:错误导致类Relativelayout

    The following is the contents of my class:

    public class Vathiyar extends Activity{

        private Button findvathiyar;
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.vathiyar); 

        }

    }

    Following is my xml code.. 

        <?xml version="1.0" encoding="utf-8"?>
        <Relativelayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/vathiyar_1"
         android:orientation = "vertical"
         android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          >
        <TextView
        android:id="@+id/widget32"
        android:layout_width="wrap_content"
        android:layout_height="-11px"
        android:text="Welcome to the Selection of Vathiyar page"
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        >
       </TextView>
        </Relativelayout>   

1 个答案:

答案 0 :(得分:0)

您的问题出在您的XML中。您的RelativeLayout拼写错误。

变化:

<Relativelayout ...
</Relativelayout>

要:

<RelativeLayout ...
</RelativeLayout>