Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7828837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:30:05+00:00 2026-06-02T10:30:05+00:00

I have been following a book on Android Beginning Android Application. I have been

  • 0

I have been following a book on Android “Beginning Android Application”. I have been trying to figure out an application which shows images in a view. But unfortunately I could not run the application because of 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 am giving here the codes.
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 another xml file. It is named as 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 lies within attrs.xml, but I dont know whats going on. And because of this the R.styleable also doesnt work either. Please help. Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:30:07+00:00Added an answer on June 2, 2026 at 10:30 am

    I think you have some characters before each line in your attrs.xml due to a copy/past method.

    Can you try to reformat your code by placing your text cursor at the beginning of each line and delete to return to previous line ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on the following problem from this book . A certain
I have been developing a book viewing website that takes rather large images (upwards
I am new to cakephp and have been working through the Apress book Beginning
I have been following along with the book Practical Django Projects. Very nice book,
I have been following the excellent book Programming Ground Up, wanting to learn assembly.
I have been working with web2py following its official web2py book and got to
I have been following the new Steve Sanderson MVC3 framework book from Apress and
I am new to Rails & Ruby and have been following the http://ruby.railstutorial.org/ruby-on-rails-tutorial-book and
I am following the CakePHP ACL tutorial http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html I have a controller called ImagesController
I have been following the usage of JavaScript for the past few years, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.