简体   繁体   English

使用图形布局的Android Eclipse项目无法添加TextView或MultiLineView

[英]Android Eclipse project using the Graphical Layout can't add TextView or MultiLineView

I've looked at several other questions related, one answer even seemed like it solved the problem however I was wrong. 我看了其他几个相关的问题,一个答案甚至似乎解决了问题,但是我错了。

The issue is I get: 问题是我得到:

Parser exception for C:\Documents and Settings\djordan\My Documents\SampleTest\AndroidManifest.xml: The markup in the document following the root element must be well-formed.

When I drag/drop a new TextView or Multiline Text view item to the canvas. 当我将新的TextView或Multiline Text视图项目拖放到画布上时。 All other Text Fields add fine. 所有其他文本字段都可以添加。

EDIT: Pasted the wrong error ... updated. 编辑:粘贴了错误的错误...已更新。 and Added following work flow: 1. open SDK, check API 16 installed. 并添加了以下工作流程:1.打开SDK,检查API 16已安装。 2. open Eclipse, create new Android project - name, target/minimum API 16 3. in Graphical Layout drag "Plain Text" or "MultiLine Text" from the Text Fields. 2.打开Eclipse,创建新的Android项目-名称,目标/最小API 16 3.在“图形布局”中,从“文本字段”中拖动“纯文本”或“多行文本”。 4. view error above. 4.查看上面的错误。

Flip over to the xml page, go through and find the textView you just added. 跳到xml页面,浏览并找到刚添加的textView。 Find the attribute where it says android:textSize="18" and change it to android:textSize="18dip" That should solve it. 找到显示android:textSize =“ 18”的属性,然后将其更改为android:textSize =“ 18dip”即可解决。 The error is telling you that the units for that attribute are not valid or were not set. 错误告诉您该属性的单位无效或未设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM