tags:

views:

70

answers:

2

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

A: 

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
Ah but i have multiple packages and this dialog is not in the default one.
Gary
ok is that <activity inside your application Node???
Jorgesys
A: 

an android.content.ActivityNotFoundException

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

Jorgesys
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