2016-07-27 6 views
1

Hallo, ich bin im Anschluss an diese einfache Parse Messaging App tutorial- https://github.com/codepath/android_guides/wiki/Building-Simple-Chat-Client-with-Parse Und ich bin immer einen Fehler auf dieser Codezeile:Android Studio XML Kontext Fehler

tools:context="${relativePackage}.${activityClass}" 

Dies ist die gesamte Datei:

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 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" 
tools:context="${relativePackage}.${activityClass}" > 

<EditText 
    android:id="@+id/etMessage" 
    android:layout_toLeftOf="@+id/btSend" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignBottom="@+id/btSend" 
    android:gravity="top" 
    android:hint="contribute..." 
    android:imeOptions="actionSend"/> 
<Button 
    android:id="@+id/btSend" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:gravity="center_vertical|right" 
    android:paddingRight="10dp" 
    android:layout_alignParentRight="true" 
    android:text="send" 
    android:textSize="18sp" > 
</Button> 

</RelativeLayout>                     

Antwort

0

Ersetzen Sie ${relativePackage} durch Ihren Paketnamen und ersetzen Sie ${activityClass} durch Ihren Klassennamen.

Zum Beispiel:

tools:context="whatever.your.package.name.ChatActivity" 
0

Ich denke, das Tutorial bedeutet, Sie sollten relativePackage und activityClass selbst besetzen. tools:context muss sich auf eine spezifische Activity, z.B. com.example.MainActivity.