android.content.ActivityNotFoundException:

If other people are encountering something similar and arrive at this post, an issue I had may save you some time. May not be related to the OP's problem but def related to the ActivityNotFound exception.

I was trying to load an activity by using:

Intent intent = new Intent( this, class );

However I continuously kept getting the ActivityNotFoundException even though I had checked and rechecked the code multiple times.

This exception I was getting wasn't actually being caused by the intent but some code I was running inside the loaded activity throwing a RuntimeException. (my issue was caused by Typeface.createFromAsset())

It is possible you are running into a similar RuntimeException in your activity.

To see if this is the case, put your intent code in try catch blocks. Like so:

try {
    /* your code */
    ...
} catch ( ActivityNotFoundException e) {
    e.printStackTrace();
}

Run your app again, and check your LogCat, if it's the same issue, you'll get a RuntimeException with a "Caused By:" entry pointing to your actual issue.

I spent a good hour trying to figure this out. Hopefully this may save someone some time.


Maybe you need to check that you added the new activity to the manifest.xml file

Example:

<activity
      android:name=".className" 
      android:label="@string/app_name" > 
</activity>