Activitynotfound Exception Thrown For A Preferenceactivity Listed In The Manifest Xml
Solution 1:
The class name looks funny in the exception:
com.areyling.myapp/java.util.prefs.Preferences
I think you may be referring to the incorrect Preference class somehow. Do you have an import statement that's importing java.util.prefs.Preferences? What happens if you try to launch the activity using it's fully qualified name?:
Intent preferencesIntent = newIntent(this, com.areyling.myapp.Preferences.class);
Solution 2:
I know this post is over two years old but every time I attempted to search for anything remotely close to this problem, this post CONTINUALLY popped up!
If that is the case for me, then I would imagine it would be the case for many others. I followed the suggestion as described above and put the full listing in my MainActivity.java
Intent preferencesIntent = newIntent(this, com.areyling.myapp.Preferences.class);
But what did the trick was put the same full listing in my MAINIFEST file as well
<activityandroid:name="com.areyling.myapp.Preferences.class"></activity>
This is what finally did me the trick!
Again, I know this post is well beyond its age, but I figured that attempting to find different posts with slightly different search engine phrases kept on bringing me to this page, I may as well update it for anyone else that is having this same problem. Thanks!
Solution 3:
I had trouble with the same problem. I was declaring Intent i2 = new Intent(this, NoteEditActivity.class);
as a class variable, which seemed to give me that error. (The reason I was doing it as a class variable is because I was using i2
in an onItemClick
method which would not let me declare it there. I moved it to a method
publicvoidbegin(int position, long id){
Intent i2 = newIntent(this, NoteEditActivity.class);
.....
}
and that fixed the error.
Post a Comment for "Activitynotfound Exception Thrown For A Preferenceactivity Listed In The Manifest Xml"