The Contacts app is using several types of hidden files. Some of them are hidden framework items, like AggregationSuggestions.PARAMETER_MATCH_NAME, and others belongs to the static libraries like com.android.phone.CallLogAsync. First kind of files should never be embedded into your APK, but the second should be.
If you look into Android.mk for the Contacts you can figure out what static libraries are needed:
LOCAL_STATIC_JAVA_LIBRARIES := \
com.android.phone.common \
com.android.vcard \
android-common \
guava \
android-support-v13 \
android-support-v4 \
android-ex-variablespeed \
To compile Contact in eclipse you should add framework classes as "User library" and all static libraries as "External JAR".
The easiest way to obtain all needed jars is to build Android sources and look into out/target/common/obj/JAVA_LIBRARIES. Each library has its own directory named libname_intermediates with classes-full-debug.jar in it. These jars are exactly what you need to build Contacts. Framework classes reside in framework_intermediates, however you may need to add some more jars.
You should adjust "Order & Export" for your project in Eclipse to make sure that your "User Library" with framework classes is above of "Android 4.0".