Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
daimajia opened this issue May 26, 2014 · 1 comment

Comments

@daimajia
Copy link

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
@ZubairKhan8564
Copy link

can you provide some code according to it
Quick Solution for this is to ,rebuild project,clean project
if still not work go to file in file click on Invalidate Caches/Restart,Hope it will work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants