Gridview与imageview和textview

时间:2011-07-22 06:36:20

标签: android gridview imageview

我找到了这个例子http://www.firstdroid.com/2011/02/06/android-tutorial-gridview-with-icon-and-text/,但我得到了Force Close,我不明白为什么...... 在LogCat中我得到:

07-22 09:40:00.767: ERROR/AndroidRuntime(320): Caused by: java.lang.ClassNotFoundException: android.view.Linearlayout in loader dalvik.system.PathClassLoader@44dac780
07-22 09:40:00.767: ERROR/AndroidRuntime(320):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
07-22 09:40:00.767: ERROR/AndroidRuntime(320):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
07-22 09:40:00.767: ERROR/AndroidRuntime(320):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
07-22 09:40:00.767: ERROR/AndroidRuntime(320):     at android.view.LayoutInflater.createView(LayoutInflater.java:466)
07-22 09:40:00.767: ERROR/AndroidRuntime(320):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
07-22 09:40:00.767: ERROR/AndroidRuntime(320):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
07-22 09:40:00.767: ERROR/AndroidRuntime(320):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)

有人有任何想法吗?

1 个答案:

答案 0 :(得分:1)

在示例中,我认为像LinearLayout,ImageView等所有xml标签都是小写的。这导致了问题