-1
這是除了我的活動代碼Android:OnCreate xml膨脹錯誤?
@Override
protected void onCreate(Bundle savedInstanceState) {
Logger.i(TAG, "onCreate");
super.onCreate(savedInstanceState);
MobclickAgent.onError(this);
setContentView(R.layout.mytrips);
initializeIntent();
initView();
}
當我運行的活動,在logcat中出現錯誤。
01-17 12:41:04.748: E/ActivityThread(6632): Failed to inflate
01-17 12:41:04.748: E/ActivityThread(6632): android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
01-17 12:41:04.748: E/ActivityThread(6632): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
01-17 12:41:04.748: E/ActivityThread(6632): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-17 12:41:04.748: E/ActivityThread(6632): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
01-17 12:41:04.748: E/ActivityThread(6632): at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
01-17 12:41:04.748: E/ActivityThread(6632): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
01-17 12:41:04.748: E/ActivityThread(6632): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
01-17 12:41:04.748: E/ActivityThread(6632): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:212)
01-17 12:41:04.748: E/ActivityThread(6632): at android.app.Activity.setContentView(Activity.java:1657)
01-17 12:41:04.748: E/ActivityThread(6632): at com.blsm.yepcolor.ui.MyTripsActivity.onCreate(MyTripsActivity.java:69)
01-17 12:41:04.748: E/ActivityThread(6632): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-17 12:41:04.748: E/ActivityThread(6632): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
01-17 12:41:04.748: E/ActivityThread(6632): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
01-17 12:41:04.748: E/ActivityThread(6632): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
01-17 12:41:04.748: E/ActivityThread(6632): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
01-17 12:41:04.748: E/ActivityThread(6632): at android.os.Handler.dispatchMessage(Handler.java:99)
01-17 12:41:04.748: E/ActivityThread(6632): at android.os.Looper.loop(Looper.java:123)
01-17 12:41:04.748: E/ActivityThread(6632): at android.app.ActivityThread.main(ActivityThread.java:3835)
01-17 12:41:04.748: E/ActivityThread(6632): at java.lang.reflect.Method.invokeNative(Native Method)
01-17 12:41:04.748: E/ActivityThread(6632): at java.lang.reflect.Method.invoke(Method.java:507)
01-17 12:41:04.748: E/ActivityThread(6632): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
01-17 12:41:04.748: E/ActivityThread(6632): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
01-17 12:41:04.748: E/ActivityThread(6632): at dalvik.system.NativeStart.main(Native Method)
01-17 12:41:04.748: E/ActivityThread(6632): Caused by: java.lang.reflect.InvocationTargetException
01-17 12:41:04.748: E/ActivityThread(6632): at java.lang.reflect.Constructor.constructNative(Native Method)
01-17 12:41:04.748: E/ActivityThread(6632): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
01-17 12:41:04.748: E/ActivityThread(6632): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
01-17 12:41:04.748: E/ActivityThread(6632): ... 21 more
請幫我解決這個問題。
XML線2是這樣的「
stream
2012-01-17 06:54:03
你能分享完整的佈局文件嗎? – 2012-01-17 07:03:23
[鏈接] http://blog.sina.com.cn/s/blog_600a93e001012j1z.html – stream 2012-01-17 11:30:49