android开发有语法错误,请大牛指点

li354886 2012-01-27 07:11:03
<TextView
android:id="@+id/myTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<Button
android:id="@+id/myButton"/
android:layout_width="fill_parent
android:layout_height="wrap_content""
/>
</LinearLayout>




import android.app.Activity;
import android.os.Bundle;
public class Activity01Activity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}


红字的部分有错,应该不是空格的问题,而且现在xml文件当中编写过了却在R.java文件当中无法显示id,甚至原来就没有id类
而且现在有错没法刷新文件。请大牛指点
...全文
85 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Stonesk 2012-02-03
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zyc13701469860 的回复:]
android:id="@+id/myButton"/ 最后多1个/
android:layout_width="fill_parent 最后少个"
android:layout_height="wrap_content"" 最后多个"

LZ好好检查下
[/Quote]
+1
fj359941160 2012-02-02
  • 打赏
  • 举报
回复
楼上正解。。

楼主写代码要仔细点。。。
Mourinho 2012-01-31
  • 打赏
  • 举报
回复
android:id="@+id/myButton"/ 最后多1个/
android:layout_width="fill_parent 最后少个"
android:layout_height="wrap_content"" 最后多个"

LZ好好检查下

51,411

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧