在prolog中不允许使用Eclipse内容 [英] Eclipse Content is not allowed in prolog

查看:141
本文介绍了在prolog中不允许使用Eclipse内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的eclipse项目中打开主题时遇到麻烦。它不断提出:



prolog中不允许内容



我没有改变我的代码或任何东西。
我不知道发生了什么问题,以前有人看过吗?

解决方案

我有同样的错误,并计算出来。



当我尝试创建一个新的字符串资源时,我尝试将新的资源值粘贴到Android资源屏幕上。令我惊讶的是,粘贴操作(使用CTRL + V)在该屏幕上不起作用,我尝试了几次。



之后,我开始收到错误。当我从Android资源屏幕切换到Strings.xml文件的原始XML屏幕时,我注意到我试图粘贴的所有文本都在文件的开头,如下所示:

 图像内容描述。图像内容描述<?xml version =1.0encoding =utf-8?> 
< resources>
< string name =app_name> My App< / string>
< / resources>

这是我的错误。


I'm having trouble opening my main in my eclipse project. It keeps coming up with:

"content is not allowed in prolog"

I haven't altered my code or anything. I have no idea what has gone wrong, anybody seen this before?

解决方案

I had the same error and figured it out.

When I tried to create a new string resource, I tried to paste the new resource value on the "Android Resources" screen. To my surprise, the paste operation (using CTRL + V) does not work on that screen, and I tried it several times.

After that I started getting the error. When I switched from the "Android Resources" screen to the raw XML screen of the Strings.xml file, I noticed that all the text that I tried to paste was at the beginning of the file, like this:

Image content description. Image content description.<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">My App</string>
</resources>

And that was causing the error for me.

这篇关于在prolog中不允许使用Eclipse内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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