由于发截图不方便,请大家见谅。
错误1:Description Resource Path Location Type
Element type "Button" must be followed by either attribute specifications, ">" or "/>". activity_main.xml /Calcultor/res/layout line 15 Android XML Format Problem
错误2:Description Resource Path Location Type
error: Error parsing XML: not well-formed (invalid token) activity_main.xml /Calcultor/res/layout line 16 Android AAPT Problem
错误代码:
<Button android:text="@string/1"android:id="@+id/1"android:layout_width="50dp"android:layout_height="50dp"/>错误1所指处
<Button android:text="@string/2"android:id="@+id/2"android:layout_width="50dp"android:layout_height="50dp"/>错误2所指出求各位好心人帮忙解答下,谢谢了。
错误1:Description Resource Path Location Type
Element type "Button" must be followed by either attribute specifications, ">" or "/>". activity_main.xml /Calcultor/res/layout line 15 Android XML Format Problem
错误2:Description Resource Path Location Type
error: Error parsing XML: not well-formed (invalid token) activity_main.xml /Calcultor/res/layout line 16 Android AAPT Problem
错误代码:
<Button android:text="@string/1"android:id="@+id/1"android:layout_width="50dp"android:layout_height="50dp"/>错误1所指处
<Button android:text="@string/2"android:id="@+id/2"android:layout_width="50dp"android:layout_height="50dp"/>错误2所指出求各位好心人帮忙解答下,谢谢了。
解决方案 »
- 想开发一款基于Android和GIS的拼车软件,请求大神指导!
- Android 如何在treeview中加checkbox
- 启动模拟器时报错:Could not open
- 怎样应用android系统实现虚拟屏?像Iphone那样滑动翻页(急)
- android的listView有滚动条时(即实际Item数比显示出来的Item数多),点击item变色事件报空指针错
- 关于拨号界面中optionsmenu的问题(急)
- 求android日历程序源代码...
- 怎么动态设置GridLayout里面的组件间距和大小?
- android 两个library 引用出现问题
- Android canvas绘折线图
- radiobutton布局问题
- 用httpclient的post发出请求后 返回bad request
<Button android:text="@string/2"android:id="@+id/2"android:layout_width="50dp"android:layout_height="50dp"/>错误2所指出
我猜你外面没套布局
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:text="@string/1" android:id="@+id/1" android:layout_width="50dp" android:layout_height="50dp"/>
<Button android:text="@string/2" android:id="@+id/2" android:layout_width="50dp" android:layout_height="50dp"/>
</RelativeLayout>
我觉得是你的button中各个属性之间没有加空格
android:text="@string/1"
android:id="@+id/1"
android:layout_width="50dp"
android:layout_height="50dp" />
<Button
android:text="@string/2"
android:id="@+id/2"
android:layout_width="50dp"
android:layout_height="50dp" />