繁体   English   中英

Android SDK 21库错误

[英]Android sdk 21 library errors

我安装了Android SDK 21捆绑包Windows x64,并且如果尝试在初始项目创建代码中添加任何代码,则只会收到错误。 我尝试在Hello World中运行,每个条目都给出了错误。 顺便说一句:我是Android和Linux的新手,但是我做了很多Windows编程。 谢谢...

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<EditText android:id="@+id/edit_message"
    android:layout_weight="1"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:hint="@string/edit_message" />
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button_send" />
</LinearLayout>

编辑:删除冗余。

您的最后一个Button(button_send)没有任何父视图。

您应该将其放入LinearLayout或其他视图中。

尝试:1)重新加载Eclipse 2)运行Project Clean。

暂无
暂无

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

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