简体   繁体   English

java.lang.RuntimeException:无法实例化应用程序,java.lang.ClassNotFoundException:

[英]java.lang.RuntimeException: Unable to instantiate application, java.lang.ClassNotFoundException:

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 :( 我没有看到它通过几个我测试的Android手机,但我通过谷歌开发者控制台大约每周一次迷恋:(

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. 有些人说它可能是由于SD卡的外在东西或者Singletone的东西。

Besides, in previous question, a thankful guy said that I should check 'name' attribute of Applcation tag in AndroidManifest.xml. 此外,在上一个问题中,一个感恩的家伙说我应该检查AndroidManifest.xml中Applcation标签的'name'属性。 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. 我一直在测试一个外部SD卡,我将我的应用程序安装到外部SD卡然后卸载。 But I couldn't re-produce. 但我无法重新制作。

And about Singletone stuff, My app doesn't use an instance of Custom Application class anywhere. 关于Singletone的东西,我的应用程序不会在任何地方使用Custom Application类的实例。 So I think the Singletone stuff couldn't be the cause of this issue. 所以我认为Singletone的东西不能成为这个问题的原因。

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: MyApplication.java:

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

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

    ...

}

AndroidManifest.xml: 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" >

Google Play商店升级过程中的已知错误, https://code.google.com/p/android/issues/detail?id = 56626

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. 您无法控制用户的系统,并且由于系统的意外行为而导致的许多崩溃无法“修复”,而不是应用程序开发人员。

似乎是你的二进制类在类路径中不可用。请检查应用程序的二进制类路径并检查该路径的可用性。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.RuntimeException: 无法实例化应用程序 com.todos.MyApplication: java.lang.ClassNotFoundException - java.lang.RuntimeException: Unable to instantiate application com.todos.MyApplication: java.lang.ClassNotFoundException java.lang.RuntimeException:无法实例化应用程序 com.projec.App:java.lang.ClassNotFoundException - java.lang.RuntimeException: Unable to instantiate application com.projec.App: java.lang.ClassNotFoundException java.lang.RuntimeException:无法实例化活动 ComponentInfo{}:java.lang.ClassNotFoundException - java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{}: java.lang.ClassNotFoundException java.lang.RuntimeException:无法实例化接收者:java.lang.ClassNotFoundException - java.lang.RuntimeException: Unable to instantiate receiver : java.lang.ClassNotFoundException java.lang.RuntimeException:无法实例化活动ComponentInfo {...}:java.lang.ClassNotFoundException:未找到类 - java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{…}: java.lang.ClassNotFoundException: Didn't find class 无法实例化应用程序java.lang.ClassNotFoundException - Unable to instantiate application java.lang.ClassNotFoundException 无法实例化应用程序:java.lang.ClassNotFoundException: - Unable to instantiate application: java.lang.ClassNotFoundException: 有关hadoop的问题“java.lang.RuntimeException:java.lang.ClassNotFoundException:” - Question on hadoop “java.lang.RuntimeException: java.lang.ClassNotFoundException: ” hadoop,java.lang.RuntimeException:java.lang.ClassNotFoundException错误 - hadoop, java.lang.RuntimeException: java.lang.ClassNotFoundException error java.lang.RuntimeException:无法实例化应用程序:ClassNotFoundException(仅在X86架构设备上) - java.lang.RuntimeException: Unable to instantiate application : ClassNotFoundException (Only on X86 architecture device)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM