3

I have a launched android application that works fine most of the time. However 1 in about 1000+ runs I get an android.content.ActivityNotFoundException: Unable to find explicit activity class exception. The activity is declared in my manifest and I've never seen it crash myself. It is declared like this...

<activity android:name="com.myCompany.myPackage.MyDialog"
   android:theme="@android:style/Theme.Dialog">
</activity> 

The crash reports show it failing on all OS's from 1.5 to 2.1.

Any help would be greatly appreciated.

--Gary

Gary
  • 31
  • 1
  • 3

2 Answers2

2

an android.content.ActivityNotFoundException

be sure your <activity is inside your <application node =)

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
  • yep, it definitely is. The only other thing that I can think of that is of note is my main activity has android:launchMode="singleTask". – Gary Jul 05 '10 at 18:27
0

you don´t need to define all your package in your activity, you will define it in your manifest xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.myCompany.myPackage"

and then in your activity

<activity android:name=".MyDialog"
   android:theme="@android:style/Theme.Dialog">
</activity> 
Jorgesys
  • 124,308
  • 23
  • 334
  • 268