凌云志轩 2015-05-15 17:39 采纳率: 0%
浏览 4173
已采纳

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-15 18:02
    关注

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

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

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

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

报告相同问题?

悬赏问题

  • ¥15 爱快路由器端口更改错误导致无法访问
  • ¥20 安装catkin时遇到了如下问题请问该如何解决呢
  • ¥15 VAE模型如何输出结果
  • ¥15 编译python程序为pyd文件报错:{"source code string cannot contain null bytes"
  • ¥20 关于#r语言#的问题:广义加行模型拟合曲线后如何求拐点
  • ¥15 fluent设置了自动保存后,会有几个时间点不保存
  • ¥20 激光照射到四象线探测器,通过液晶屏显示X、Y值
  • ¥50 数据库开发问题求解答
  • ¥15 安装anaconda时报错
  • ¥15 小程序有个导出到插件方式,我是在分包下引入的插件,这个export的路径对吗,我看官方文档上写的是相对路径
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部