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 trialbhogi gandu
261 PointsI am getting a NullPointerExcetion ...........
I am getting a null pointer exception when i run the app ....
Here is my error lines......... 2019-03-22 12:21:49.596 15020-15078/? E/ActivityThread: Failed to find provider info for com.facebook.appmanager.oxygen.nekodirect.progress 2019-03-22 12:21:49.643 14868-14951/com.yogigorle.stormy E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: com.yogigorle.stormy, PID: 14868 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.yogigorle.stormy.CurrentWeather.getLocationLabel()' on a null object reference at com.yogigorle.stormy.MainActivity$1.onResponse(MainActivity.java:71) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:216) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:760)
1 Answer
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 PointsHi bhogi gandu
Have seen the Log Cat error but need to see your code around line 71 on the MainActivity. It seems there is something that has been initialized possibly the CurrentWeather class or some TextView.
Let me know please.
Alex z
9,027 PointsAlex z
9,027 Pointsmy bet its error getting data from http / okhttp3