奇怪的xml错误:行结束错误 [英] Strange xml error: Incorrect line ending

查看:129
本文介绍了奇怪的xml错误:行结束错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从一个星期前就没有使用过Eclipse。今天我启动它,我注意到它加载缓慢。当它开始时,它提示:



http://tinypic.com?ref=2zpk1g2&quot; target =_blank>< img src = http://i48.tinypic的.com / 2zpk1g2.png&安培; QUOT ;边界=" 0" alt =TinyPic的图像和视频托管>< / a>>



我可以想到,Eclipse可能已经更新了一些Android,所以我更新到最新的ADT现在我有相同的错误,但我有一个额外的大错误,我不知道是否是因为以前的错误。我已经尝试了新的功能,看看xml层在许多设备中的外观,我尝试过2层,现在该程序不编译,因为它说:


错误的行结束:找到回车(\r)没有对应换行符(\\\


一个xml的错误在此行中:

  android:layout_height =wrap_content> 

而另一个在:

  android:orientation =horizo​​ntal> 

wtf发生了,我没有改变任何东西,也没有保存,1周前一切都很好。


<迪v class =h2_lin>解决方案

我刚刚遇到同样烦人的问题。
我所做的是将整个代码复制到记事本中。
然后从记事本,将其粘贴回xml字段。
我知道,这听起来很愚蠢,但它有效,我不知道为什么--__-


I haven't used Eclipse since 1 week ago. Today I started it and I noticed that it loaded slowly. When it was started it prompted this:

http://tinypic.com?ref=2zpk1g2&quot; target="_blank"><img src="http://i48.tinypic.com/2zpk1g2.png&quot; border="0" alt="Image and video hosting by TinyPic"></a>">

I thougth that maybe Eclipse has updated something of Android so I updated to the newest ADT. Now I have the same error but I have an extra big error that I don't know if it's because the previous error. I have tried the new feature of look how an xml layer looks in many devices. I have tried with 2 layers and now the program doesn't compiles because it says:

Incorrect line ending: found carriage return (\r) without corresponding newline (\n)

The error for one xml is in this line:

     android:layout_height="wrap_content">    

and the other one is in:

    android:orientation="horizontal">

wtf has happened? I didn't change anything nor saved it and 1 week ago all was fine.

解决方案

I just got the same annoying problem. What I did was copying the entire code into notepad. Then from notepad, paste it back into the xml field. I know, it sounds stupid, but it worked and I have no idea why -__-"

这篇关于奇怪的xml错误:行结束错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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