I keep getting this error
NullPointer
08-16 22:55:46.360: ERROR/AndroidRuntime(11047): Caused by: java.lang.NullPointerException
08-16 22:55:46.360: ERROR/AndroidRuntime(11047): at com.fttech.htmlParser.releaseInfo.onCreate(releaseInfo.java:62)
08-16 22:55:46.360: ERROR/AndroidRuntime(11047): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
08-16 22:55:46.360: ERROR/AndroidRuntime(11047): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1712)
Its pointing to my Element here
Element paragraph = overview.select("p").last();
i am using this to retrieve the article
try {
doc = Jsoup.connect(url).get();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(doc == null){
Toast.makeText(this, "Couldnt retrieve game info", Toast.LENGTH_SHORT);
}
else{
// Get the overview div
Element overview = doc.select("div#object-overview").last();