I built my android project from command line and compile using `ant debug install`. But after i import a external project called [Android-PullToRefresh](https://github.com/chrisbanes/Android-PullToRefresh) to my project, my project becomes abnormal when running. Sometimes after i add a new id or delete a id in xml layout file, and my compile goes well but when the app starting to run, it throws a `ClassCastException`.  

When it happens i can only use `ant clean && ant debug install` to fix it. But recompile a hole project costs double time, i don't wish to compile a project for one minute or more. So can i do some trick to make this error won't happen again?

Stack trace:

```
E/AndroidRuntime(21226): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zhangdan.preferential/com.zhangdan.preferential.RecommendActivity}: java.lang.ClassCastException: android.widget.TextView cannot be cast to com.handmark.pulltorefresh.library.PullToRefreshListView
E/AndroidRuntime(21226):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2185)
E/AndroidRuntime(21226):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2210)
E/AndroidRuntime(21226):    at android.app.ActivityThread.access$600(ActivityThread.java:142)
E/AndroidRuntime(21226):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)
E/AndroidRuntime(21226):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(21226):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(21226):    at android.app.ActivityThread.main(ActivityThread.java:4931)
E/AndroidRuntime(21226):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(21226):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(21226):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(21226):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
E/AndroidRuntime(21226):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(21226): Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to com.handmark.pulltorefresh.library.PullToRefreshListView
E/AndroidRuntime(21226):    at com.zhangdan.preferential.RecommendActivity.findViews(RecommendActivity.java:65)
E/AndroidRuntime(21226):    at com.zhangdan.preferential.RecommendActivity.onCreate(RecommendActivity.java:58)
E/AndroidRuntime(21226):    at android.app.Activity.performCreate(Activity.java:5008)
E/AndroidRuntime(21226):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
E/AndroidRuntime(21226):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2139)
E/AndroidRuntime(21226):    ... 11 more
W/ActivityManager(  380): 

```

RecommendActivity.java:

```
 64     private void findViews() { 
 65         mFakeListView = (PullToRefreshListView)findViewById(R.id.refreshable_list); 
 66         mListView = mFakeListView.getRefreshableView(); 
 67     } 

```

xml:

```
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <com.handmark.pulltorefresh.library.PullToRefreshListView 
  3     xmlns:android="http://schemas.android.com/apk/res/android"
  4     xmlns:ptr="http://schemas.android.com/apk/res-auto"
  5     android:id="@+id/refreshable_list"
  6     android:layout_width="fill_parent"
  7     android:layout_height="fill_parent"
  8     android:cacheColorHint="#00000000"
  9     android:fadingEdge="none"
 10     android:listSelector="@android:color/transparent"
 11     android:divider="@null"
 12     android:paddingTop="5dip"
 13     android:paddingBottom="5dip"
 14     android:scrollbarStyle="outsideOverlay"
 15     ptr:ptrMode="both" />

```