不明白到底是哪里出什么问题了,大神见笑
11-04 11:44:57.467 1221-1221/com.ghost.cn_game E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ghost.cn_game/com.ghost.cn_game.CN_Game}: android.view.InflateException: Binary XML file line #2: Error inflating class com.ghost.cn_game.cn_view
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class com.ghost.cn_game.cn_view
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
at android.app.Activity.setContentView(Activity.java:1657)
at com.ghost.cn_game.CN_Game.onCreate(CN_Game.java:16)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
????????????at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
????????????at android.app.ActivityThread.access$1500(ActivityThread.java:117)
????????????at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
????????????at android.os.Handler.dispatchMessage(Handler.java:99)
????????????at android.os.Looper.loop(Looper.java:130)
????????????at android.app.ActivityThread.main(ActivityThread.java:3683)
????????????at java.lang.reflect.Method.invokeNative(Native Method)
????????????at java.lang.reflect.Method.invoke(Method.java:507)
????????????at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
????????????at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
????????????at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.ghost.cn_game.cn_view in loader dalvik.system.PathClassLoader[/data/app/com.ghost.cn_game-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.view.LayoutInflater.createView(LayoutInflater.java:471)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
????????????at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
????????????at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
????????????at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
????????????at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
????????????at android.app.Activity.setContentView(Activity.java:1657)
????????????at com.ghost.cn_game.CN_Game.onCreate(CN_Game.java:16)
????????????at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
????????????at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
????????????at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
????????????at android.app.ActivityThread.access$1500(ActivityThread.java:117)
????????????at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
????????????at android.os.Handler.dispatchMessage(Handler.java:99)
????????????at android.os.Looper.loop(Looper.java:130)
????????????at android.app.ActivityThread.main(ActivityThread.java:3683)
????????????at java.lang.reflect.Method.invokeNative(Native Method)
????????????at java.lang.reflect.Method.invoke(Method.java:507)
????????????at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
????????????at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
????????????at dalvik.system.NativeStart.main(Native Method)
11-04 12:07:53.428 1290-1290/com.ghost.cn_game D/AndroidRuntime﹕ Shutting down VM
11-04 12:07:53.428 1290-1290/com.ghost.cn_game W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xb6f404f0)
11-04 12:07:53.428 1290-1290/com.ghost.cn_game E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ghost.cn_game/com.ghost.cn_game.CN_Game}: android.view.InflateException: Binary XML file line #2: Error inflating class com.ghost.cn_game.cn_view
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class com.ghost.cn_game.cn_view
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
at android.app.Activity.setContentView(Activity.java:1657)
at com.ghost.cn_game.CN_Game.onCreate(CN_Game.java:16)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
????????????at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
????????????at android.app.ActivityThread.access$1500(ActivityThread.java:117)
????????????at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
????????????at android.os.Handler.dispatchMessage(Handler.java:99)
????????????at android.os.Looper.loop(Looper.java:130)
????????????at android.app.ActivityThread.main(ActivityThread.java:3683)
????????????at java.lang.reflect.Method.invokeNative(Native Method)
????????????at java.lang.reflect.Method.invoke(Method.java:507)
????????????at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
????????????at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
????????????at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.ghost.cn_game.cn_view in loader dalvik.system.PathClassLoader[/data/app/com.ghost.cn_game-2.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.view.LayoutInflater.createView(LayoutInflater.java:471)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
????????????at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
????????????at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
????????????at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
????????????at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
????????????at android.app.Activity.setContentView(Activity.java:1657)
????????????at com.ghost.cn_game.CN_Game.onCreate(CN_Game.java:16)
????????????at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
????????????at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
????????????at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
????????????at android.app.ActivityThread.access$1500(ActivityThread.java:117)
????????????at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
????????????at android.os.Handler.dispatchMessage(Handler.java:99)
????????????at android.os.Looper.loop(Looper.java:130)
????????????at android.app.ActivityThread.main(ActivityThread.java:3683)
????????????at java.lang.reflect.Method.invokeNative(Native Method)
????????????at java.lang.reflect.Method.invoke(Method.java:507)
????????????at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
????????????at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
????????????at dalvik.system.NativeStart.main(Native Method)
------解决思路----------------------
XML文件解析有问题
android.view.InflateException: Binary XML file line #2: Error inflating class com.ghost.cn_game.cn_view
你看这行错误提示,具体在XML文件的第2行,com.ghost.cn_game.cn_view这个类有问题