6

I already asked to find out the solution of this issue, but I can't get good answer for me. So I'm trying to write a question more in detail.

The below error occurs sometimes for some users. I haven't seen it through several android phones which I have for testing, but I got this crush via Google developer console roughly once a week :(

I've tried to find out to solve this problem for a long time. Some people talk it might be due to an exteranl SD card stuff, or Singletone stuff.

Besides, in previous question, a thankful guy said that I should check 'name' attribute of Applcation tag in AndroidManifest.xml. But I already put the package name on it so I don't think it's the cause of the crush.

I've been testing about an external SD card that I installed my app to external SD card and then unmounted. But I couldn't re-produce.

And about Singletone stuff, My app doesn't use an instance of Custom Application class anywhere. So I think the Singletone stuff couldn't be the cause of this issue.

Even I do not know how to re-produce the crush, so I really need a document or public stuff about it.

I'm sure there's somebody who got this error and already know how to solve. Thus, please help me know what's wrong and how I can fix it. Have a nice day, Thanks.

Error:

    java.lang.RuntimeException: Unable to instantiate
    application com.***.***.MyApplication:
    java.lang.ClassNotFoundException: com.***.***.MyApplication at
    android.app.LoadedApk.makeApplication(LoadedApk.java:501) at
    android.app.ActivityThread.handleBindApplication(ActivityThread.java:4253)
    at android.app.ActivityThread.access$1400(ActivityThread.java:143)
    at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1301)
    at android.os.Handler.dispatchMessage(Handler.java:99) at
    android.os.Looper.loop(Looper.java:137) at
    android.app.ActivityThread.main(ActivityThread.java:4950) 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:997)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:764) at
    dalvik.system.NativeStart.main(Native Method) Caused by:
    java.lang.ClassNotFoundException: com.***.***.MyApplication at
    dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:501) at
    java.lang.ClassLoader.loadClass(ClassLoader.java:461) at
    android.app.Instrumentation.newApplication(Instrumentation.java:982)
    at android.app.LoadedApk.makeApplication(LoadedApk.java:496) ... 11
    more

MyApplication.java:

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
            ...
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
    }

    ...

}

AndroidManifest.xml:

...
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
...
<application
        android:name="com.***.***.MyApplication"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
7
  • why "extends Application"? Try "extends Activity" Commented May 19, 2014 at 5:37
  • @Fraggles The reason why I use 'extends Application' is because to initiate global stuffs. It's not a class for activity Commented May 19, 2014 at 5:51
  • Are you using any external jar file? Commented May 19, 2014 at 5:54
  • @Siddharth yes, I am. I'm using many libs like volley.jar, external-gson and so on. Commented May 19, 2014 at 6:17
  • @Siddharth I already did what you want me to do.. hmm In my application in eclipse, 'android-uspport-v7-appcompat' is used, and as seeing Java build path, there is it both on android dependencies and android private libraries as jar file. could it be a cause of the crush? Commented May 19, 2014 at 8:22

3 Answers 3

4

Known bug in the Google Play store upgrade process, https://code.google.com/p/android/issues/detail?id=56296

Sign up to request clarification or add additional context in comments.

Comments

2

This is caused due to problems on the device which is beyond your control. Even I get similar reports in dev console, but after extensive research I have concluded that you simply cannot prevent this crash from your side by using any conventional means because it is not caused by any fault in your app but a fault on user's system. You cannot control your user's system and many crashes which are caused due to unexpected behavior of the system cannot be "fixed", not by app developers.

1 Comment

How to explain this to clients? :P
0

Seems to be your binary classes are not available in class path.Please check the binary class path of the application and check the availability of that path .

1 Comment

I'm using eclipse tool so I actually didn't care about it. So If you don't mind, could you tell me how to check what you meant?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.