Skip to content Skip to sidebar Skip to footer

Android App Is Crashing When Installing Through Eclipse

I get the following exception every time I reinstall my through eclipse. It happens every time I reinstall an app that is currently in the foreground. I expect that this error is

Solution 1:

i got this problem when someting in XML is wrong, maybe you just have to regenerate your R.java

Solution 2:

I had this problem recently but showing up in IDEA. I had to switch mid-project to Eclipse - ouch! I got no good answers on here an eventually, after I finished the project, I went back to IDEA and tried again. The final solution was to move the project out of my workspace, delete everything except my source and resources, then create a new project from existing sources. I wasted hours trying to figure this out and it might just work for you in Eclipse. Got to be worth a try...

Good luck

Solution 3:

You have a null pointer on line 346 in the initializeJavaContextClassLoader method.

02-2211:31:07.098: E/AndroidRuntime(479): at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:346)

Edit

Here is the method from the GrepCode/com.google.android/android/2.3_r1/ android.app.LoadedApk (starting at line 326)

privatevoidinitializeJavaContextClassLoader() {
    IPackageManagerpm= ActivityThread.getPackageManager();
    android.content.pm.PackageInfo pi;
    try {
        pi = pm.getPackageInfo(mPackageName, 0);
    } catch (RemoteException e) {
        thrownewAssertionError(e);
    }
    /*
     * Two possible indications that this package could be
     * sharing its virtual machine with other packages:
     *
     * 1.) the sharedUserId attribute is set in the manifest,
     *     indicating a request to share a VM with other
     *     packages with the same sharedUserId.
     *
     * 2.) the application element of the manifest has an
     *     attribute specifying a non-default process name,
     *     indicating the desire to run in another packages VM.
     */booleansharedUserIdSet= (pi.sharedUserId != null);
    booleanprocessNameNotDefault=
            (pi.applicationInfo != null &&
            !mPackageName.equals(pi.applicationInfo.processName));
    booleansharable= (sharedUserIdSet || processNameNotDefault);
    ClassLoadercontextClassLoader=
            (sharable)
            ? newWarningContextClassLoader()
    : mClassLoader;
            Thread.currentThread().setContextClassLoader(contextClassLoader);
}

It looks like you might be trying to share a virtual machine with another package.

Post a Comment for "Android App Is Crashing When Installing Through Eclipse"