2016-07-27 10 views
1

안녕하세요이 간단한 구문 분석 메시징 앱이 https://github.com/codepath/android_guides/wiki/Building-Simple-Chat-Client-with-Parse 을 tutorial- 다음과 나는 코드 줄에 오류를 받고 있어요 :안드로이드 스튜디오 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.

관련 문제