带有图像视图和文本视图的 Gridview
我找到了这个例子 http:// www.firstdroid.com/2011/02/06/android-tutorial-gridview-with-icon-and-text/ 但我得到强制关闭,我不明白为什么...... 在 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)
有人知道吗?
I found this example http://www.firstdroid.com/2011/02/06/android-tutorial-gridview-with-icon-and-text/ but I get Force Close and I don't understand why...
In LogCat I get :
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)
Have anyone any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在示例中,我认为所有 xml 标签(如 LinearLayout、ImageView 等)都是小写的。这就是导致问题的原因
In the example i think all the xml tags like LinearLayout, ImageView etc are lower case. That is causing the problm