Skip to content

Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.RelativeLayout #44

Description

@daimajia
E/AndroidRuntime(26414): java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.erikw.pulltorefresh.sample/eu.erikw.pulltorefresh.sample.PullToRefreshListViewSampleActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class eu.erikw.PullToRefreshListView
E/AndroidRuntime(26414):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
E/AndroidRuntime(26414):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
E/AndroidRuntime(26414):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime(26414):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime(26414):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(26414):    at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(26414):    at android.app.ActivityThread.main(ActivityThread.java:5017)
E/AndroidRuntime(26414):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(26414):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(26414):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime(26414):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime(26414):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(26414): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class eu.erikw.PullToRefreshListView
E/AndroidRuntime(26414):    at android.view.LayoutInflater.createView(LayoutInflater.java:620)
E/AndroidRuntime(26414):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
E/AndroidRuntime(26414):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
E/AndroidRuntime(26414):    at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
E/AndroidRuntime(26414):    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
E/AndroidRuntime(26414):    at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
E/AndroidRuntime(26414):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
E/AndroidRuntime(26414):    at android.app.Activity.setContentView(Activity.java:1929)
E/AndroidRuntime(26414):    at eu.erikw.pulltorefresh.sample.PullToRefreshListViewSampleActivity.onCreate(PullToRefreshListViewSampleActivity.java:40)
E/AndroidRuntime(26414):    at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime(26414):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime(26414):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
E/AndroidRuntime(26414):    ... 11 more
E/AndroidRuntime(26414): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime(26414):    at java.lang.reflect.Constructor.constructNative(Native Method)
E/AndroidRuntime(26414):    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
E/AndroidRuntime(26414):    at android.view.LayoutInflater.createView(LayoutInflater.java:594)
E/AndroidRuntime(26414):    ... 22 more
E/AndroidRuntime(26414): Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.RelativeLayout
E/AndroidRuntime(26414):    at eu.erikw.PullToRefreshListView.init(PullToRefreshListView.java:229)
E/AndroidRuntime(26414):    at eu.erikw.PullToRefreshListView.<init>(PullToRefreshListView.java:100)
E/AndroidRuntime(26414):    ... 25 more
W/ActivityManager(  776):   Force finishing activity eu.erikw.pulltorefresh.sample/.PullToRefreshListViewSampleActivity

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions