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

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

反话 发布于 2021-12-01 字数 9967 浏览 665 回复 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

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

扫码加入群聊

发布评论

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

评论(5

冷弦 2021-12-01 5 楼

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

带上头具痛哭 2021-12-01 4 楼

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

别低头,皇冠会掉 2021-12-01 3 楼

回复
167行代码是啥?debug

傾城如夢未必闌珊 2021-12-01 2 楼

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

半世蒼涼 2021-12-01 1 楼

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)