I got the stack trace below in the Android developer account. There is just one occurrence of this error.
java.lang.RuntimeException: Unable to instantiate application com.mysite.myapp.TestApplication: java.lang.ClassNotFoundException: com.mysite.myapp.TestApplication in loader dalvik.system.PathClassLoader[/data/app-private/com.mysite.myapp-2.apk]
at android.app.LoadedApk.makeApplication(LoadedApk.java:466)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3268)
at android.app.ActivityThread.access$2200(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.myapp.myapp.TestApplication in loader dalvik.system.PathClassLoader[/data/app-private/com.mysite.myapp-2.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newApplication(Instrumentation.java:945)
at android.app.LoadedApk.makeApplication(LoadedApk.java:461)
... 11 more
In my manifest file, I have declared com.mysite.myapp.TestApplication.
My Manifest file looks like this:
<application
android:name="com.mysite.myapp.TestApplication"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/Theme.myapp" >
<activity
android:name="com.mysite.myapp.ActivityDashboard"
android:configChanges="orientation|keyboard"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
If your main home page is ActivityDashboard.java
insert as below or if TestApplication.java
replace .ActivityDashboard as .TestApplication in the activity tag
<package name="com.mysite.myapp"
<application
android:name="TestApplication"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/Theme.myapp" >
<activity android:name=".ActivityDashboard" android:configChanges="orientation|keyboard"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
......
</application>
android:name="com.mysite.myapp.ActivityDashboard"
Replace thr above in your manifest with the below.
android:name=".ActivityDashboard"
Alternatively:
android:name="com.mysite.myapp.TestApplication.ActivityDashboard"
Related
please my app crashes whenever i click the navigation item to start activity. i Have tried all the solutions from similar questions in the last 6 hours to no avail. that includes registering the activity in manifest, changing intent (this,menu_profile.class); to (mainactivity.this, menu_profile.class); to `(getApplicationContext(), menu_profile.class);. googling permission (13) error to brought no solution.
snippet
else if (itemId == R.id.third) {
Intent intent = new Intent(getApplicationContext(), Menu_Profile.class);
startActivity(intent);
}
manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.majesty.adesanmi.viewpager_nav">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Menu_Profile"
android:label="DestinationActivity"/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</application>
</manifest>
Logcat error
06-16 09:46:56.913 2889-2889/? E/Trace: error opening trace file: Permission denied (13)
06-16 09:46:56.983 2889-2889/com.majesty.adesanmi.viewpager_nav E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
06-16 09:47:41.673 2889-2889/com.majesty.adesanmi.viewpager_nav E/AndroidRuntime: FATAL EXCEPTION: main
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.majesty.adesanmi.viewpager_nav/com.majesty.adesanmi.viewpager_nav.Menu_About}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
at android.app.Activity.startActivityForResult(Activity.java:3351)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
at android.app.Activity.startActivityForResult(Activity.java:3312)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
at android.app.Activity.startActivity(Activity.java:3522)
at android.app.Activity.startActivity(Activity.java:3490)
at com.majesty.adesanmi.viewpager_nav.MainActivity$2.onNavigationItemSelected(MainActivity.java:157)
at android.support.design.widget.NavigationView$1.onMenuItemSelected(NavigationView.java:156)
at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822)
at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:969)
at android.support.design.internal.NavigationMenuPresenter$1.onClick(NavigationMenuPresenter.java:342)
at android.view.View.performClick(View.java:4084)
at android.view.View$PerformClick.run(View.java:16966)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
just remove intent filter from your menu profilr activity this from your Manifist file or replace this
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Menu_Profile"
android:label="DestinationActivity"/>
</application>
I have a Application in that I want to add QR reader as a Activity/Module
So,I followed this to Read QR code..
and Here Its working fine..
So I have added this code to My application and I want to use this activity for that I have designed a new activity in that On-click it should start Qr reader..
But I am getting this error...
Here I Tried with this
Button b = (Button) findViewById(R.id.main);
b.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent i = new Intent(Qdata.this,DecoderActivity.class);
startActivity(i);
}
Here DecoderActivity.calass is northig But another application or activity which is Qr reader form the above example so I want to Include this in my activity....
This at Manifest
<activity
android:name=".adata.Qdata"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.my.adata.Qdata" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".adata.DecoderActivity"
android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="com.my.adata.DecoderActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Actually here adata is a another package in my Application... and Main package is com.my
So in com.my I have another files for QR purpose I have separated this two activities
This is Error
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my/com.my.adata.DecoderActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.support.v7.widget.ToolbarWidgetWrapper.<init>(ToolbarWidgetWrapper.java:98)
at android.support.v7.widget.ToolbarWidgetWrapper.<init>(ToolbarWidgetWrapper.java:91)
at android.support.v7.app.ToolbarActionBar.<init>(ToolbarActionBar.java:73)
at android.support.v7.app.AppCompatDelegateImplV7.setSupportActionBar(AppCompatDelegateImplV7.java:205)
at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:99)
at com.my.adata.DecoderActivity.onCreate(DecoderActivity.java:43)
at android.app.Activity.performCreate(Activity.java:4470)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
Can any one suggest me what is problem...
Why are you using two launcher activity try to make one louncher activity and than call your activity.
<activity
android:name=".adata.Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.my.adata.Qdata">
</activity>
Do this changes in manifest...
<activity
android:name="com.my.adata.Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER">
</intent-filter>
</activity>
<activity
android:name="com.my.adata.Qdata"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="com.my.adata.Qdata" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
I have an android application installed on my phone and i would like to launch one of the activities through the adb shell. Here is the manifest of the file:
EDIT I have also posted the logcat info below all of the manifest code and adb commands. It is throwing a NullPointerException.
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2010100" android:versionName="2.1.1" package="com.aurorasoftworks.quadrant.ui.standard"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" />
<application android:label="#string/app_name" android:icon="#drawable/icon" android:name="com.aurorasoftworks.quadrant.ui.standard.QuadrantStandardApplication">
<activity android:label="#string/app_name" android:name=".QuadrantStandardLauncherActivity" android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="#string/app_name" android:name=".QuadrantStandardActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity" android:screenOrientation="portrait" android:noHistory="true" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.score.BenchmarkScoreActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.browser.DeviceVendorListActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.browser.DeviceListActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.browser.DeviceStatsActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.sysinfo.SystemInfoActivity" />
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SET_ORIENTATION" />
</manifest>
I tried launching the QuadrantStandardActivity using the command:
adb shell am start -n com.aurorasoftworks.quadrant.ui.standard/.QuadrantStandardActivity
and it worked. But when I tried to connect to another activity it failed. The command I used was:
adb shell am start -n com.aurorasoftworks.quadrant.ui.standard/com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity
Logcat Info:
E/AndroidRuntime(11973): FATAL EXCEPTION: main
E/AndroidRuntime(11973): java.lang.NullPointerException
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.core.C.a(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.A.a(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity.h(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.r.apply$mcV$sp(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.r.a(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.r.apply(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.util.r.run(Unknown Source)
E/AndroidRuntime(11973): at android.os.Handler.handleCallback(Handler.java:725)
E/AndroidRuntime(11973): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(11973): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(11973): at android.app.ActivityThread.main(ActivityThread.java:5074)
E/AndroidRuntime(11973): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(11973): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(11973): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(11973): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime(11973): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 739): Force finishing activity com.aurorasoftworks.quadrant.ui.standard/com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity
W/ActivityManager( 739): Force finishing activity com.aurorasoftworks.quadrant.ui.standard/.QuadrantStandardActivity
W/ActivityManager( 739): Activity pause timeout for ActivityRecord{413150d0 u0 com.aurorasoftworks.quadrant.ui.standard/com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity}
I/ActivityManager( 739): Process com.aurorasoftworks.quadrant.ui.standard (pid 11973) has died.
I would appreciate any help
when start the BenchmarkExecutionActivity throws a NullPointerException,check the code why throws the exception.
.BenchmarkExecutionActivity
should be in
com.aurorasoftworks.quadrant.ui.standard
package. either change your package name in the first line of manifest from
package="com.aurorasoftworks.quadrant.ui.standard"
to
package="com.aurorasoftworks.quadrant.ui"
or put that activity inside
com.aurorasoftworks.quadrant.ui.standard
package.
I updated the Sherlock action bar library to new version in my project. After compiling and running logcat shows NoClassDefFoundError.
I have checked the jar versions. I have added the jars in project libs folder. I also checked order and export tab in build path. I also tried clean and build. Still i am getting NoClassDefFoundError.
My LogCat is shown below
E/AndroidRuntime(9699): java.lang.NoClassDefFoundError: com.mobiotics.tvbuddydemo.TVBuddyMainActivity
E/AndroidRuntime(9699): at com.mobiotics.tvbuddydemo.SplashScreen.onCreate(SplashScreen.java:54)
E/AndroidRuntime(9699): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(9699): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
E/AndroidRuntime(9699): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
E/AndroidRuntime(9699): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
E/AndroidRuntime(9699): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
E/AndroidRuntime(9699): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(9699): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(9699): at android.app.ActivityThread.main(ActivityThread.java:3839)
E/AndroidRuntime(9699): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(9699): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(9699): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime(9699): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime(9699): at dalvik.system.NativeStart.main(Native Method)
THE error line in splash screen
TVBuddyMainActivity.setSuccess(false);
i cant figure out the cause earlier working fine
My MAINFEST
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mobiotics.tvbuddydemo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="15"
/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyTheme"
android:screenOrientation="portrait"
>
<activity
android:name=".SplashScreen"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TVBuddyMain"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".CustomSearch"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".PackageBuilderActivity"
android:screenOrientation="portrait"
>
</activity>
<service
android:name="com.mobiotics.tvbuddy.data.service.Droid_service"
android:exported="false" />
</application>
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
If you are using jar file. Do not add by "java Build path". Jar file should be in libs folder. if there is not libs folder create it and please put your jar file in libs folder. Then Right click on jar file and do build path and add to build path.
thank u
com.mobiotics.tvbuddydemo.TVBuddyMainActivity is not declared in android manifest file.
you have declared android:name=".TVBuddyMain" whic is not needed.
furthermore accessing static method inside an activity is not good idea.
TVBuddyMainActivity.setSuccess(false)
pass that false value through intent.
I have an app with ~11k active installs for which I sometimes receive ClassNotFoundExceptions that I can't explain. They look like this:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{name.of.my.MainActivityClass}: java.lang.ClassNotFoundException: name.of.my.MainActivityClass in loader dalvik.system.PathClassLoader[/mnt/asec/name.of.my-2/pkg.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1743)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851)
at android.app.ActivityThread.access$1500(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:4293)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: name.of.my.MainActivityClass in loader dalvik.system.PathClassLoader[/mnt/asec/name.of.my-2/pkg.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newActivity(Instrumentation.java:1040)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1735)
... 11 more
I received some of these exceptions from users that updated my app (not only for the most recent version), so I think it is not a problem that is specific to some phones as the app worked for them before.
I got these exception reports for my main activity class, a receiver class and a BackupAgent class.
All of those classes are always instantiated directly from Android. My Manifest file looks like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="name.of.my"
android:versionCode="20"
android:versionName="1.10.2"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8" />
<application android:icon="#drawable/icon" android:label="#string/app_name" android:backupAgent="name.of.my.OwnBackupAgent">
<activity android:name="name.of.my.MainActivityClass"
android:label="#string/app_name"
android:theme="#style/MyTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="name.of.my.OwnReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.media.RINGER_MODE_CHANGED" />
</intent-filter>
</receiver>
</application>
</manifest>
After searching the net for some hours, the most likely explanations I found are:
it might be related to moving the app to SD card while there are still some services running (but the android dev guide says that all services are canceled in this case, and it doesn't explain why my main activity class suddenly can't be found anymore)
the .apk might be corrupted after updating via the android market. Could this be true? If yes, what can I do against it - if not, what else might be the problem?