简体   繁体   中英

Android sdk 21 library errors

I installed Android SDK 21 bundle Windows x64 and get nothing but errors if I try to add any code to the initial project creation code. I tried running through the Hello World and every entry gave an error. BTW: I am a newbie with Android and Linux, but I have done a lot of Windows programming. thanks...

<?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>

EDIT: removed redundancy.

Your last Button(button_send) didn't have any parent view.

You should to put that into a view like LinearLayout or others.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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