English 中文(简体)
活动 并非为安妮斯·曼内斯特所列的优惠行为而放弃的优惠例外。 [闭门]
原标题:ActivityNotFound exception thrown for PreferenceActivity listed in AndroidManifest.xml [closed]
  • 时间:2011-10-22 02:27:01
  •  标签:
  • java
  • android

我试图在我看来添加一个优惠屏幕。

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?

但它被宣布。 任何想法?

我研究了许多类似问题,但我没有回答。

最佳回答

我认为,答案可能是你的xml。

<acitivity android:name="steamanywhere.com.Preferences" >
</acitivity> 

页: 1

<activity android:name="steamanywhere.com.Preferences" >
</activity> 

另外,你为什么不说什么?

<activity android:name=".Preferences" >
</activity> 
问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签