凌云志轩 2015-05-16 01:39 采纳率: 89%
浏览 4166
已采纳

android 运行时出现的错误

我选择logcat里面的error,运行程序时出现以下错误,这是什么呢?看不懂呀。运行多次后出现Unable to instantiate application android.app.Application: java.lang.NullPointerException。而我在另一个文件夹下载的项目做了一样的修改,运行起来一点儿问题也么,我搞不懂了。

每次出现的问题
05-16 09:40:07.532 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:07.532 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:12.557 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:12.557 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:16.922 425-581/? E/Watchdog﹕ !@Sync 70
05-16 09:40:17.562 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:17.572 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:22.597 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:22.597 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:27.612 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:27.622 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:32.607 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:32.607 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:37.622 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:37.622 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:42.627 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:42.627 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:43.658 425-435/? E/WifiP2pStateTracker﹕ getNetworkInfo : NetworkInfo: type: WIFI_P2P[], state: UNKNOWN/IDLE, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
05-16 09:40:43.868 7171-7252/? E/MtpServerJNI﹕ server is null in send_object_added
05-16 09:40:43.868 7253-7253/? E/MTPJNIInterface﹕ In MTPJNIINterface onReceive:com.android.MTP.OBJECT_ADDED
05-16 09:40:43.908 639-639/? E/CscFactoryReceiver﹕ onReceive android.intent.action.MEDIA_SCANNER_FINISHED
05-16 09:40:43.918 639-639/? E/CscUpdateService﹕ costomer file is exists : it has been preconfiged.
05-16 09:40:43.928 639-639/? E/CscUpdateService﹕ costomer file is exists : it has been preconfiged.
05-16 09:40:43.938 639-8468/? E/CscParser﹕ update(): xml file exist
05-16 09:40:43.938 639-639/? E/CscUpdateService﹕ costomer file is exists : it has been preconfiged.
05-16 09:40:43.948 639-8479/? E/CscParser﹕ update(): xml file exist
05-16 09:40:43.958 639-8480/? E/CscParser﹕ update(): xml file exist
05-16 09:40:43.968 6928-6928/? E/EasyGalleryWidget﹕ itemCount : 106
05-16 09:40:43.968 6928-6928/? E/EasyGalleryWidget﹕ mItemCountForDBCheck : 0
05-16 09:40:43.978 6928-8483/? E/EasyGalleryWidget﹕ !!!!! UpdateRemoteViewThread run()
05-16 09:40:44.258 131-397/? E/MetadataRetrieverClient﹕ failed to extract an album art
05-16 09:40:44.258 6928-8483/? E/MediaMetadataRetrieverJNI﹕ getEmbeddedPicture: Call to getEmbeddedPicture failed.
05-16 09:40:46.921 425-581/? E/Watchdog﹕ !@Sync 71
05-16 09:40:47.662 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:47.662 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:52.686 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:52.686 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:40:57.711 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:40:57.711 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:41:02.716 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:41:02.716 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:41:07.751 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:41:07.751 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:41:12.756 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:41:12.756 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:41:16.930 425-581/? E/Watchdog﹕ !@Sync 72
05-16 09:41:17.791 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:41:17.791 7253-7253/? E/MtpService﹕ battPlugged Type : 2
05-16 09:41:22.806 7253-7253/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
05-16 09:41:22.806 7253-7253/? E/MtpService﹕ battPlugged Type : 2

运行多次后出现
05-16 09:47:18.683 8534-8534/com.xfengche.wwww.xfegncheradio_net E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException
at android.app.LoadedApk.makeApplication(LoadedApk.java:501)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4238)
at android.app.ActivityThread.access$1400(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1297)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4935)
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:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:377)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:320)
at android.app.LoadedApk.makeApplication(LoadedApk.java:493)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4238)
            at android.app.ActivityThread.access$1400(ActivityThread.java:140)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1297)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4935)
            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:1038)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
            at dalvik.system.NativeStart.main(Native Method)

  • 写回答

3条回答 默认 最新

  • danielinbiti 2015-05-16 02:02
    关注

    AndroidManifest.xml中的application里的android:name去掉试试

      <application
            android:name=""//去掉
    

    或者自己继承application重新写一个

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥100 有人会搭建GPT-J-6B框架吗?有偿
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名