When working on the Hello, Gallery tutorial/sample app, after following the instructions on the site, Eclipse reported that R.styleable cannot be resolved.
What is t
I tried everything, but with no luck. The generated R.java was showing the stylable class but the compilation was showing "Stylable Not found". I just added the package name before R, after the change, everything is working fine now...
So, if your package name is com.example.test, then modify following code...
public ImageAdapter(Context c) {
mContext = c;
TypedArray a = c.obtainStyledAttributes(R.styleable.Gallery1);
mGalleryItemBackground = a.getResourceId(R.styleable.Gallery1_android_galleryItemBackground, 0);
a.recycle();
}
TO
public ImageAdapter(Context c) {
mContext = c;
TypedArray a = c.obtainStyledAttributes(com.example.test.R.styleable.Gallery1);
mGalleryItemBackground = a.getResourceId(com.example.test.R.styleable.Gallery1_android_galleryItemBackground, 0);
a.recycle();
}