由于发截图不方便,请大家见谅。
错误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.permission.RECEIVE_SMS与android.provider.Telephony.SMS_RECEIVED区别与联系
- ListView疑难
- android 通过jni操作串口(急)
- android 照相问题
- 关于String提取字符,菜鸟求指教
- 开发环境的配置,联网down东西的时候,是不是很麻烦?
- ddms调试错误
- android开发,监听来电显示求解决!!!!!
- eclipse 搜索中文字符用正则添加到行尾(即+注释;//匹配到的中文字符)
- sqlite如何实现判断具体某行某列的字段是否为空?
- 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" />