根据教程写的代码报错

先看一下代码:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.thenewboston.sammy"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"

这是根据一个教程写的,但是报错 : error: Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme'). android:theme="@style/AppTheme" >

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

你要在styles.xml里写个AppTheme
形如:

    <resources xmlns:android="http://schemas.android.com/apk/res/android">
       <style name="AppTheme" parent="android:Theme.Light">
       <item name="android:windowNoTitle">true</item>
       <item name="android:windowFullscreen">false</item>
       <item name="android:windowContentOverlay">@android:color/transparent</item>
       </style>
    </resources>

AppTheme未定义,要么在styles.xml里写个AppTheme,要么使用系统提供的Theme,如android:theme="@android:style/Theme.Dialog"