Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Weather App (2015) Hooking Up the Model to the View Wrapping Up

weather app (Stormy) crash on start.

hello there, i've followed your steps one by one and everything was working fine and clear, but at the end where we are hooking up the MVC with the code when i run the app it keep crashing i thought the vm emulator could be the reason but i tried alot of them and nothing seems to work here is the log chat :

03-22 12:38:49.276 2379-2379/synctc.me.stormy I/System.out﹕ debugger has settled (1427) 03-22 12:38:49.379 2379-2379/synctc.me.stormy D/AndroidRuntime﹕ Shutting down VM 03-22 12:38:49.380 2379-2379/synctc.me.stormy E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: synctc.me.stormy, PID: 2379 java.lang.RuntimeException: Unable to start activity ComponentInfo{synctc.me.stormy/synctc.me.stormy.MainActivity}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) at android.app.ActivityThread.access$800(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) Caused by: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView at synctc.me.stormy.MainActivity$$ViewInjector.inject(MainActivity$$ViewInjector.java:20) at synctc.me.stormy.MainActivity$$ViewInjector.inject(MainActivity$$ViewInjector.java:8) at butterknife.ButterKnife.inject(ButterKnife.java:317) at butterknife.ButterKnife.inject(ButterKnife.java:232) at synctc.me.stormy.MainActivity.onCreate(MainActivity.java:54) at android.app.Activity.performCreate(Activity.java:5933) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)             at android.app.ActivityThread.access$800(ActivityThread.java:144)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:135)             at android.app.ActivityThread.main(ActivityThread.java:5221)             at java.lang.reflect.Method.invoke(Native Method)             at java.lang.reflect.Method.invoke(Method.java:372)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 03-22 12:40:03.074 2402-2402/synctc.me.stormy D/AndroidRuntime﹕ Shutting down VM 03-22 12:40:03.074 2402-2402/synctc.me.stormy E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: synctc.me.stormy, PID: 2402 java.lang.RuntimeException: Unable to start activity ComponentInfo{synctc.me.stormy/synctc.me.stormy.MainActivity}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) at android.app.ActivityThread.access$800(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) Caused by: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView at synctc.me.stormy.MainActivity$$ViewInjector.inject(MainActivity$$ViewInjector.java:20) at synctc.me.stormy.MainActivity$$ViewInjector.inject(MainActivity$$ViewInjector.java:8) at butterknife.ButterKnife.inject(ButterKnife.java:317) at butterknife.ButterKnife.inject(ButterKnife.java:232) at synctc.me.stormy.MainActivity.onCreate(MainActivity.java:54) at android.app.Activity.performCreate(Activity.java:5933) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)             at android.app.ActivityThread.access$800(ActivityThread.java:144)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:135)             at android.app.ActivityThread.main(ActivityThread.java:5221)             at java.lang.reflect.Method.invoke(Native Method)             at java.lang.reflect.Method.invoke(Method.java:372)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 03-22 12:40:11.721 2402-2402/synctc.me.stormy I/Process﹕ Sending signal. PID: 2402 SIG: 9 03-22 12:40:22.985 2443-2443/synctc.me.stormy D/AndroidRuntime﹕ Shutting down VM 03-22 12:40:22.985 2443-2443/synctc.me.stormy E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: synctc.me.stormy, PID: 2443 java.lang.RuntimeException: Unable to start activity ComponentInfo{synctc.me.stormy/synctc.me.stormy.MainActivity}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) at android.app.ActivityThread.access$800(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) Caused by: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView at synctc.me.stormy.MainActivity$$ViewInjector.inject(MainActivity$$ViewInjector.java:20) at synctc.me.stormy.MainActivity$$ViewInjector.inject(MainActivity$$ViewInjector.java:8) at butterknife.ButterKnife.inject(ButterKnife.java:317) at butterknife.ButterKnife.inject(ButterKnife.java:232) at synctc.me.stormy.MainActivity.onCreate(MainActivity.java:54) at android.app.Activity.performCreate(Activity.java:5933) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)             at android.app.ActivityThread.access$800(ActivityThread.java:144)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:135)             at android.app.ActivityThread.main(ActivityThread.java:5221)             at java.lang.reflect.Method.invoke(Native Method)             at java.lang.reflect.Method.invoke(Method.java:372)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)