出于某种原因,每当我尝试启动我的片段时,我都会收到以下错误:
12-27 16:54:52.345: D/OpenGLRenderer(4506): Enabling debug mode 0
12-27 16:54:53.775: D/AndroidRuntime(4506): Shutting down VM
12-27 16:54:53.775: W/dalvikvm(4506): threadid=1: thread exiting with uncaught exception (group=0x40be4930)
12-27 16:54:53.785: E/AndroidRuntime(4506): FATAL EXCEPTION: main
12-27 16:54:53.785: E/AndroidRuntime(4506): java.lang.RuntimeException: Unable to start activity ComponentInfo{info.twfs.thewholefnshow/info.twfs.thewholefnshow.ILikeWrestlingActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.os.Handler.dispatchMessage(Handler.java:99)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.os.Looper.loop(Looper.java:137)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.ActivityThread.main(ActivityThread.java:5039)
12-27 16:54:53.785: E/AndroidRuntime(4506): at java.lang.reflect.Method.invokeNative(Native Method)
12-27 16:54:53.785: E/AndroidRuntime(4506): at java.lang.reflect.Method.invoke(Method.java:511)
12-27 16:54:53.785: E/AndroidRuntime(4506): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-27 16:54:53.785: E/AndroidRuntime(4506): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-27 16:54:53.785: E/AndroidRuntime(4506): at dalvik.system.NativeStart.main(Native Method)
12-27 16:54:53.785: E/AndroidRuntime(4506): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-27 16:54:53.785: E/AndroidRuntime(4506): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.Activity.setContentView(Activity.java:1881)
12-27 16:54:53.785: E/AndroidRuntime(4506): at info.twfs.thewholefnshow.ILikeWrestlingActivity.onCreate(ILikeWrestlingActivity.java:16)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.Activity.performCreate(Activity.java:5104)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
12-27 16:54:53.785: E/AndroidRuntime(4506): ... 11 more
12-27 16:54:53.785: E/AndroidRuntime(4506): Caused by: java.lang.NullPointerException: name == null
12-27 16:54:53.785: E/AndroidRuntime(4506): at java.lang.VMClassLoader.findLoadedClass(Native Method)
12-27 16:54:53.785: E/AndroidRuntime(4506): at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:354)
12-27 16:54:53.785: E/AndroidRuntime(4506): at java.lang.ClassLoader.loadClass(ClassLoader.java:491)
12-27 16:54:53.785: E/AndroidRuntime(4506): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.support.v4.app.Fragment.instantiate(Fragment.java:391)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.support.v4.app.Fragment.instantiate(Fragment.java:369)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:272)
12-27 16:54:53.785: E/AndroidRuntime(4506): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
12-27 16:54:53.785: E/AndroidRuntime(4506): ... 21 more
令我困惑的是,这只发生在我的平板电脑上运行应用程序时,而不是我的手机上。我试图完全替换 XML,并得到同样的错误。我检查了清单,名称或其他任何内容都没有错误。
关于什么可能导致此错误的任何想法?