2016-07-27 6 views
1

こんにちは私はこのシンプルな解析メッセージングアプリケーションはhttps://github.com/codepath/android_guides/wiki/Building-Simple-Chat-Client-with-Parse をtutorial-以下だと私はこのコード行でエラーを取得しています:の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

チュートリアルでは、relativePackageactivityClassを自分で設定する必要があると思います。 tools:contextは具体的なActivityを参照する必要があります。 com.example.MainActivity

関連する問題