我试图在我看来添加一个优惠屏幕。
www.un.org/Depts/DGACM/index_chinese.htm
public class Preferences extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.layout.preferences);
}
}
pviss.xml
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="General Settings">
<RingtonePreference
android:name="Ringtone"
android:summary="Select a Ringtone for recieved messages"
android:title="Rington"
android:key="ringtonPref" />
</PreferenceCategory>
<PreferenceCategory
android:title="Account Settings">
<Preference
android:title="Sign Out"
android:summary="Sign out of current account"
androidKey="signOut" />
</PreferenceCategory>
</PreferenceScreen>
<>AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="steamanywhere.com"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar"
android:debuggable="true">
<activity android:name=".SteamAnywhere"
android:label="@string/app_name">
</activity>
<acitivity android:name="steamanywhere.com.Preferences" >
</acitivity>
<activity android:name=".StartupScreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:enabled="true" android:name=".WebEventListener" />
</application>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
优惠活动在海伦开始。 java与以下法典:
Intent preferenceIntent = new Intent(this, steamanywhere.com.Preferences.class);
startActivity(preferenceIntent);
在<条码>启动(参考);条码>上,我有以下例外:
android.content.ActivityNotFoundException: Unable to find explicit activity class {steamanywhere.com/steamanywhere.com.Preferences}; have you declared this activity in your AndroidManifest.xml?
但它被宣布。 任何想法?
我研究了许多类似问题,但我没有回答。