2016-07-27 3 views
1

Привет я после этого просто Анализировать сообщений App tutorial- https://github.com/codepath/android_guides/wiki/Building-Simple-Chat-Client-with-Parse И я получаю сообщение об ошибке на этой строке кода:Android Studio контекст XML ошибка

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

Это весь файл:

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

ответ

0

Замените ${relativePackage} на название своего пакета и замените ${activityClass} на ваше имя класса.

Например:

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

Я думаю, что учебное пособие означает, что вы должны заполнить relativePackage и activityClass самостоятельно. tools:context должен относиться к конкретному Activity, например. com.example.MainActivity.

Смежные вопросы