这是我的代码并向我发送错误(致命例外:主要),我想帮助我非常感谢
这是我来自 Activity.java 的代码
package hola.mundo;
import android.app.Activity;
import android.os.Bundle;
public class HolaActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
这是我来自 main.xml 的代码
<?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:hint="@string/edit_message" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send"/>
</LinearLayout>
和strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Hola</string>
<string name="edit_message">Enter a Message</string>
<string name="button_send">Send</string>
</resources>
请任何人都可以帮助我