0
코드를 구글 안드로이드 NDK 레슨을하는 :XML 오류 - 1
<?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:weightSum="1"
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:id="@+id/bSend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send" />
</LinearLayout>
오류 메시지 :
가BUILD FAILED
C:\My First App\res\layout\activity_main.xml:7: Unexpected element "{}LinearLayout" {antlib:org.apache.tools.ant}LinearLayout
코드는 거의 정확하게 안드로이드 웹 사이트의 코드와 동일하고 정말 나는 그것이 작동하도록 할 수없는 것을 좌절시킨다. 코드의 문제입니까 아니면 내 편입니까? Eclipse를 사용 중입니다.
거의 똑같습니다. 어떻게 다른가요? – nitind
이 부분은 id/bsend 부분입니다. Google 웹 사이트의 코드는 다음과 같습니다. http://developer.android.com/training/basics/firstapp/building-ui.html –
아마 관련 : http://stackoverflow.com/questions/3581251/how-do-i -fix-unexpected-element-target-antliborg-apache-tools-anttarget – Dalmas