Android应用程序:错误"找到的文本和QUOT; [英] Android Application:Error "Found text"

查看:192
本文介绍了Android应用程序:错误"找到的文本和QUOT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注一本关于Android的开始Android的应用程序。我一直在试图找出这说明图像视图中的一个应用程序。但不幸的是我不能跑,因为下面的错误应用:

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

为了方便我给这里的codeS。 main.xml中

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>

此应用程序需要另一个XML文件。它被命名为下RES /值attrs.xml。 attrs.xml

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>

我认为问题出在attrs.xml,但我不知道怎么回事。因为这和R.styleable也要么不工作。请帮忙。在此先感谢

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

推荐答案

我觉得你有你的attrs.xml每一行之前的一些字符由于复制/过去的方法。

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

您可以尝试将您的文本光标在每一行的开头重新格式化code和删除返回previous行?

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 ?

这篇关于Android应用程序:错误&QUOT;找到的文本和QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆