先看一下代碼:
<?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>