android.util.AndroidRuntimeException:不能将刷解雇和操作栏结合起来
舱单档案:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.helloandroid" android:versionCode="1"android:versionName="1.0" ><uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /><application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.example.helloandroid.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity></application></manifest>
MainActivity.Java
package com.example.helloandroid;import android.app.Activity;import android.os.Bundle;import android.widget.TextView;public class MainActivity extends Activity {/** Called when the activity is first created. */@Overridepublic void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);}}
Active_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello" /></RelativeLayout>
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19" />