I’ve read through similar errors however I’m confused as to how to avoid this error when working with the ADT plugin for eclipse.
I’m attempting to follow this tutorial on how to create a Grid view of images:
http://developer.android.com/guide/topics/ui/layout/gridview.html
Step five simply states open Open HelloGridView.java, however I’m not sure if I should just create a new class, or activity.
“Step five:
Create a new class called ImageAdapter that extends BaseAdapter:
I’ve tried both creating a new class and creating a new activity. When i created an activity I made com.example.HelloGridView the hierarchy. But I don’t think this is right and I don’t think these should be activities. and I receive this error:
The declared package “” does not match the expected package “com.example.hellogridview”
in the HelloGridView.java and ImageAdapter.java
What I really want to know is how should I create a new class like in step four and step 5?
(also I’m very new to android I’ve gone through the android training “get started” but still feel slightly clueless, Where should I go from here?)
Any help would be greatly appreciated!!
Your new class
HelloGridViewneed to must be under your application packagecom.example.hellogridview.