I figured out the problem. I was trying to add keyBackground attribute in key xml file. I had to use it in input.xml file. Here is the right place for using this attribute:
<android.keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:keyBackground="@layout/border" />