App 运行出错,帮我看一下日志

发布于 2021-12-01 02:42:29 字数 9953 浏览 714 评论 5

@火蚁 你好,想跟你请教个问题:

06-02 15:47:10.221: E/AndroidRuntime(19868): FATAL EXCEPTION: main
06-02 15:47:10.221: E/AndroidRuntime(19868): Process: net.oschina.app, PID: 19868
06-02 15:47:10.221: E/AndroidRuntime(19868): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.oschina.app/net.oschina.app.ui.MainActivity}: android.view.InflateException: Binary XML file line #56: Error inflating class fragment
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.ActivityThread.access$800(ActivityThread.java:135)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.os.Handler.dispatchMessage(Handler.java:102)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.os.Looper.loop(Looper.java:136)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.ActivityThread.main(ActivityThread.java:5001)
06-02 15:47:10.221: E/AndroidRuntime(19868): at java.lang.reflect.Method.invokeNative(Native Method)
06-02 15:47:10.221: E/AndroidRuntime(19868): at java.lang.reflect.Method.invoke(Method.java:515)
06-02 15:47:10.221: E/AndroidRuntime(19868): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
06-02 15:47:10.221: E/AndroidRuntime(19868): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
06-02 15:47:10.221: E/AndroidRuntime(19868): at dalvik.system.NativeStart.main(Native Method)
06-02 15:47:10.221: E/AndroidRuntime(19868): Caused by: android.view.InflateException: Binary XML file line #56: Error inflating class fragment
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
06-02 15:47:10.221: E/AndroidRuntime(19868): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.Activity.setContentView(Activity.java:1929)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
06-02 15:47:10.221: E/AndroidRuntime(19868): at net.oschina.app.ui.MainActivity.onCreate(MainActivity.java:118)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.Activity.performCreate(Activity.java:5231)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
06-02 15:47:10.221: E/AndroidRuntime(19868): ... 11 more
06-02 15:47:10.221: E/AndroidRuntime(19868): Caused by: java.lang.NullPointerException
06-02 15:47:10.221: E/AndroidRuntime(19868): at net.oschina.app.ui.NavigationDrawerFragment.initView(NavigationDrawerFragment.java:167)
06-02 15:47:10.221: E/AndroidRuntime(19868): at net.oschina.app.ui.NavigationDrawerFragment.onCreateView(NavigationDrawerFragment.java:109)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1504)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:915)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1099)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1201)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:292)
06-02 15:47:10.221: E/AndroidRuntime(19868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
06-02 15:47:10.221: E/AndroidRuntime(19868): ... 24 more
06-02 15:50:33.178: E/AndroidRuntime(20177): FATAL EXCEPTION: main
06-02 15:50:33.178: E/AndroidRuntime(20177): Process: net.oschina.app, PID: 20177
06-02 15:50:33.178: E/AndroidRuntime(20177): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.oschina.app/net.oschina.app.ui.MainActivity}: android.view.InflateException: Binary XML file line #56: Error inflating class fragment
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.ActivityThread.access$800(ActivityThread.java:135)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.os.Handler.dispatchMessage(Handler.java:102)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.os.Looper.loop(Looper.java:136)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.ActivityThread.main(ActivityThread.java:5001)
06-02 15:50:33.178: E/AndroidRuntime(20177): at java.lang.reflect.Method.invokeNative(Native Method)
06-02 15:50:33.178: E/AndroidRuntime(20177): at java.lang.reflect.Method.invoke(Method.java:515)
06-02 15:50:33.178: E/AndroidRuntime(20177): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
06-02 15:50:33.178: E/AndroidRuntime(20177): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
06-02 15:50:33.178: E/AndroidRuntime(20177): at dalvik.system.NativeStart.main(Native Method)
06-02 15:50:33.178: E/AndroidRuntime(20177): Caused by: android.view.InflateException: Binary XML file line #56: Error inflating class fragment
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
06-02 15:50:33.178: E/AndroidRuntime(20177): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.Activity.setContentView(Activity.java:1929)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
06-02 15:50:33.178: E/AndroidRuntime(20177): at net.oschina.app.ui.MainActivity.onCreate(MainActivity.java:118)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.Activity.performCreate(Activity.java:5231)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
06-02 15:50:33.178: E/AndroidRuntime(20177): ... 11 more
06-02 15:50:33.178: E/AndroidRuntime(20177): Caused by: java.lang.NullPointerException
06-02 15:50:33.178: E/AndroidRuntime(20177): at net.oschina.app.ui.NavigationDrawerFragment.initView(NavigationDrawerFragment.java:167)
06-02 15:50:33.178: E/AndroidRuntime(20177): at net.oschina.app.ui.NavigationDrawerFragment.onCreateView(NavigationDrawerFragment.java:109)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1504)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:915)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1099)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1201)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:292)
06-02 15:50:33.178: E/AndroidRuntime(20177): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
06-02 15:50:33.178: E/AndroidRuntime(20177): ... 24 more


如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

冷弦 2021-12-01 09:55:52

按这个配置一下,http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0102/2247.html

带上头具痛哭 2021-12-01 09:49:58

安卓新手!下载的最新代码~ 想从这个开源功能入手写安卓开发 NULLpoint我也看到了,但是不知道怎么解决,已经到家门口了,能帮忙再具体一点错误解决方法?

别低头,皇冠会掉 2021-12-01 09:38:07

回复
167行代码是啥?debug

傾城如夢未必闌珊 2021-12-01 07:59:53

@vinson_lou 可以了 原来配置eclipse环境的问题

半世蒼涼 2021-12-01 07:41:23

06-02 15:47:10.221: E/AndroidRuntime(19868): Caused by: java.lang.NullPointerException

06-02 15:47:10.221: E/AndroidRuntime(19868): at net.oschina.app.ui.NavigationDrawerFragment.initView(NavigationDrawerFragment.java:167)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文