1
回答
请问各位大神一个关于开源中国客户端源码问题?
华为云实践训练营,热门技术免费实践!>>>   
06-30 09:39:42.553: E/AndroidRuntime(10407): FATAL EXCEPTION: main
06-30 09:39:42.553: E/AndroidRuntime(10407): Process: net.oschina.app, PID: 10407
06-30 09:39:42.553: E/AndroidRuntime(10407): 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-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2336)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2398)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.ActivityThread.access$800(ActivityThread.java:153)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.os.Handler.dispatchMessage(Handler.java:102)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.os.Looper.loop(Looper.java:135)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.ActivityThread.main(ActivityThread.java:5308)
06-30 09:39:42.553: E/AndroidRuntime(10407): at java.lang.reflect.Method.invoke(Native Method)
06-30 09:39:42.553: E/AndroidRuntime(10407): at java.lang.reflect.Method.invoke(Method.java:372)
06-30 09:39:42.553: E/AndroidRuntime(10407): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
06-30 09:39:42.553: E/AndroidRuntime(10407): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
06-30 09:39:42.553: E/AndroidRuntime(10407): Caused by: android.view.InflateException: Binary XML file line #56: Error inflating class fragment
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
06-30 09:39:42.553: E/AndroidRuntime(10407): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:385)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.Activity.setContentView(Activity.java:2154)
06-30 09:39:42.553: E/AndroidRuntime(10407): at net.oschina.app.ui.MainActivity.onCreate(MainActivity.java:119)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.Activity.performCreate(Activity.java:6033)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2289)
06-30 09:39:42.553: E/AndroidRuntime(10407): ... 10 more
06-30 09:39:42.553: E/AndroidRuntime(10407): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
06-30 09:39:42.553: E/AndroidRuntime(10407): at net.oschina.app.ui.NavigationDrawerFragment.initView(NavigationDrawerFragment.java:167)
06-30 09:39:42.553: E/AndroidRuntime(10407): at net.oschina.app.ui.NavigationDrawerFragment.onCreateView(NavigationDrawerFragment.java:109)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1504)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:915)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1099)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1201)
06-30 09:39:42.553: E/AndroidRuntime(10407): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:292)

06-30 09:39:42.553: E/AndroidRuntime(10407): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)

这个点击app 无法进入 mainactivity  报上面的错误。 不知道是加载时候内存溢出导致无法加载布局,还是 fragment 有错误

举报
xiaoshaoye
发帖于1年前 1回/240阅
顶部