• <tfoot id='Kg74q'></tfoot>

      <i id='Kg74q'><tr id='Kg74q'><dt id='Kg74q'><q id='Kg74q'><span id='Kg74q'><b id='Kg74q'><form id='Kg74q'><ins id='Kg74q'></ins><ul id='Kg74q'></ul><sub id='Kg74q'></sub></form><legend id='Kg74q'></legend><bdo id='Kg74q'><pre id='Kg74q'><center id='Kg74q'></center></pre></bdo></b><th id='Kg74q'></th></span></q></dt></tr></i><div id='Kg74q'><tfoot id='Kg74q'></tfoot><dl id='Kg74q'><fieldset id='Kg74q'></fieldset></dl></div>
      • <bdo id='Kg74q'></bdo><ul id='Kg74q'></ul>

      <small id='Kg74q'></small><noframes id='Kg74q'>

      <legend id='Kg74q'><style id='Kg74q'><dir id='Kg74q'><q id='Kg74q'></q></dir></style></legend>

      1. RuntimeException:无法实例化应用程序

        时间:2023-08-29

          <tbody id='B0aiM'></tbody>
        <tfoot id='B0aiM'></tfoot>
      2. <small id='B0aiM'></small><noframes id='B0aiM'>

      3. <legend id='B0aiM'><style id='B0aiM'><dir id='B0aiM'><q id='B0aiM'></q></dir></style></legend>
      4. <i id='B0aiM'><tr id='B0aiM'><dt id='B0aiM'><q id='B0aiM'><span id='B0aiM'><b id='B0aiM'><form id='B0aiM'><ins id='B0aiM'></ins><ul id='B0aiM'></ul><sub id='B0aiM'></sub></form><legend id='B0aiM'></legend><bdo id='B0aiM'><pre id='B0aiM'><center id='B0aiM'></center></pre></bdo></b><th id='B0aiM'></th></span></q></dt></tr></i><div id='B0aiM'><tfoot id='B0aiM'></tfoot><dl id='B0aiM'><fieldset id='B0aiM'></fieldset></dl></div>
          <bdo id='B0aiM'></bdo><ul id='B0aiM'></ul>

                  本文介绍了RuntimeException:无法实例化应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  当我运行我的应用程序时,每次我的 logcat 中都会出现以下异常:

                  When I run my application, everytime I am getting the below exception in my logcat:

                   04-14 09:29:53.965: W/dalvikvm(1020): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
                      04-14 09:29:53.985: E/AndroidRuntime(1020): FATAL EXCEPTION: main
                      04-14 09:29:53.985: E/AndroidRuntime(1020): java.lang.RuntimeException: Unable to instantiate application   android.app.Application: java.lang.NullPointerException
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.LoadedApk.makeApplication(LoadedApk.java:482)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3938)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.ActivityThread.access$1300(ActivityThread.java:123)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.os.Handler.dispatchMessage(Handler.java:99)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.os.Looper.loop(Looper.java:137)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.ActivityThread.main(ActivityThread.java:4424)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at java.lang.reflect.Method.invokeNative(Native Method)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at java.lang.reflect.Method.invoke(Method.java:511)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at dalvik.system.NativeStart.main(Native Method)
                      04-14 09:29:53.985: E/AndroidRuntime(1020): Caused by: java.lang.NullPointerException
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:362)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.LoadedApk.getClassLoader(LoadedApk.java:305)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     at android.app.LoadedApk.makeApplication(LoadedApk.java:474)
                      04-14 09:29:53.985: E/AndroidRuntime(1020):     ... 11 more
                  

                  注意:当我从模拟器中卸载应用程序并运行它时,我没有收到此异常,但是当我在模拟器中重新运行已安装的应用程序时,我得到了这个.请帮忙.

                  Note: When I uninstall the app from the emulator and run it, then I don't get this exception but when I re-run the installed application in emulator, I am getting this. Please help.

                  推荐答案

                  这是当 dalvik 重新安装 .apk 文件并尝试重用或回收之前打开的活动/视图时,底层框架引发的详细错误消息包(如果您还没有关闭之前安装的应用程序).它与您的应用无关,此外,您的应用不太可能因最终用户设备上出现此详细错误消息而冻结或崩溃.

                  This is a verbose error message raised by underlying framework when dalvik re-install .apk file and trying to reuse or recycle the previous opened activity/view from the same package (if you haven't closed the previous installed app yet). It has nothing to do with your app, moreover, it is very unlikely that your app will get freezed or crashed cause by this verbose error message on end user's device.

                  似乎这个 dalvik 详细错误日志只发生在 Android 4.0 系统上,我自己在 Android 3.2 和 2.3.3 运行环境中对其进行了测试,您无法在其中复制以在它们都不显示此消息.here 之前已经讨论过类似的问题,并且有人已经在 Android 问题跟踪器.

                  It seems that this dalvik verbose error log only happend on Android 4.0 system, I've tested it myself on Android 3.2 and 2.3.3 running environment, where you cannot replicate to get this message shown on neither of them. A similar question has been discussed before at here and someone has filled a bug report in Android Issues Tracker.

                  我认为你暂时不用太在意这个冗长的错误日志,如果你在Logcat中查看更多这个红色错误之前和之后的日志,你可以看到完整的故事,发现之前打开的活动/视图(标记为死亡状态)被杀死,新安装的视图最终被弹出.

                  I don't think you should concern too much about this verbose error log at the moment, if you look more logs before and after this red error in Logcat, you can see the full story and find that the previous opened activity/view (which are marked as died state) get killed and the newly re-installed one get poped ultimately.

                  这篇关于RuntimeException:无法实例化应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 Android 的外部存储中写入文件 下一篇:错误“与 adb 的连接已关闭,出现严重错误.&quo

                  相关文章

                  最新文章

                1. <legend id='6rydq'><style id='6rydq'><dir id='6rydq'><q id='6rydq'></q></dir></style></legend>
                      <i id='6rydq'><tr id='6rydq'><dt id='6rydq'><q id='6rydq'><span id='6rydq'><b id='6rydq'><form id='6rydq'><ins id='6rydq'></ins><ul id='6rydq'></ul><sub id='6rydq'></sub></form><legend id='6rydq'></legend><bdo id='6rydq'><pre id='6rydq'><center id='6rydq'></center></pre></bdo></b><th id='6rydq'></th></span></q></dt></tr></i><div id='6rydq'><tfoot id='6rydq'></tfoot><dl id='6rydq'><fieldset id='6rydq'></fieldset></dl></div>
                      • <bdo id='6rydq'></bdo><ul id='6rydq'></ul>

                      <tfoot id='6rydq'></tfoot>

                      <small id='6rydq'></small><noframes id='6rydq'>