Close Sidebar

Android Lint Error

+1 vote
4,330 views

When I run lint I get the following warning: Unexpected text found in layout file: "". It says it'* happening at line 4 in "drawable". All of my referenced drawables exist in /res/drawable.

Does anyone know what could be causing this? I can ignore the warning but I'd rather fix it if possible.

Also, I get warnings for unused strings and icons when they're only referenced in AndroidManifest.xml. Is there a way to fix those instead of ignoring them?

asked Jul 6, 2013 by lordchimbo (150 points)
edited Jul 6, 2013 by ugochimbo

1 Answer

+1 vote
 
Best answer

Perhaps there'* an invisible character somewhere in the white space. I'd try recreating the xml from scratch (not using copy-and-paste, which would just copy the problem, if that'* what'* happening). I'd also clean and rebuild the project.

As far as the unused resource warnings, I don't think there'* a way to control this. The problem of false positives is hugely worse for library projects. Android lint is a fairly new tool and (in my opinion) still has a lot of rough edges.

You can also Format the xml file (CTRL + SHIFT + *). The extra characters would be displayed.

answered Jul 6, 2013 by ugochimbo (860 points)
selected Jul 6, 2013 by lordchimbo
Thank you... it worked!
  1. Login or Register

    Click to open login box. Login or register from here

  2. Search Box

    Click to open the search box. You can search within the site content here

  3. Hello Admin!

    You can reach to admin section by clicking on this navigation item

  4. Ask A Question

    Start asking a question by clicking on this navigation item

  5. Find All Recent Activities

    Here you can find all recent activities recent question, answer, comment etc

  6. Vote Question or Answer

    You can give up or down vote to the question or answer by clicking on respective arrow button

  7. Give Your Answer

    Click this button to give your answer to the question

  8. Add Comment

    To post comment click on the button

  9. Select Best Answer

    Consider the answer as the best answer for your question by clicking one to the tick

  10. Congratulations!!!

    Now you learn how to use site. Why don't you start to ask a question or provide some answer to the community!

...