I am following the Android book "Getting the Android App". I tried to figure out an application that displays images in a view. But, unfortunately, I could not start the application due to the following errors:
[2012-04-24 19:37:33 - Gallery] F:\eclipse workspace\Gallery\res\values
\attrs.xml:2:error: Found text "
[2012-04-24 19:37:33 - Gallery] Γ’β¬βΉΓ’β¬βΉΓ’β¬βΉΓ’β¬βΉ " where item tag is expected
For convenience, I give the codes here. main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Bilai"
/>
<Gallery
android:id="@+id/gallery1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<ImageView
android:id="@+id/image1"
android:layout_width="320px"
android:layout_height="250px"
android:scaleType="fitXY"
/>
</LinearLayout>
This application requires a different XML file. It is called attrs.xml under res / values. attrs.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
β<declare-styleable name="Gallery1" >
ββββ<attr name="android:galleryItemBackground" />
βββ</declare-styleable>
</resources>
I think the problem is attrs.xml, but I don't know what is going on. And because of this, R.styleable also does not work. Please help. thanks in advance
source
share