app crashes while fetching images from server on some devices - android

I am fetching images from a server and setting it in a list view. The problem is that it is working properly in many devices but in some devices it crashes while downloading for first the time.
But when I try to do it again it opens without any problem. For the first time it says out of memory error. is this problem related to coding or its just related to heap memory of devices?
here's the log-
07-19 16:22:04.050: E/image_url(14776): http://siliconsoftwares.in/real_json/uploads/property/agent/three hindustani/DSC_0145.jpg
07-19 16:22:04.060: E/AndroidRuntime(14776): FATAL EXCEPTION: AsyncTask #4
07-19 16:22:04.060: E/AndroidRuntime(14776): java.lang.RuntimeException: An error occured while executing doInBackground()
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.os.AsyncTask$3.done(AsyncTask.java:299)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.lang.Thread.run(Thread.java:856)
07-19 16:22:04.060: E/AndroidRuntime(14776): Caused by: java.lang.OutOfMemoryError
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:527)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:599)
07-19 16:22:04.060: E/AndroidRuntime(14776): at com.example.realstate.FeaturedPropertiesActivity$ImageLoader.doInBackground(FeaturedPropertiesActivity.java:235)
07-19 16:22:04.060: E/AndroidRuntime(14776): at com.example.realstate.FeaturedPropertiesActivity$ImageLoader.doInBackground(FeaturedPropertiesActivity.java:1)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.os.AsyncTask$2.call(AsyncTask.java:287)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
07-19 16:22:04.060: E/AndroidRuntime(14776): ... 5 more
07-19 16:22:04.630: E/WindowManager(14776): Activity com.example.realstate.FeaturedPropertiesActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#4442ee10 that was originally added here
07-19 16:22:04.630: E/WindowManager(14776): android.view.WindowLeaked: Activity com.example.realstate.FeaturedPropertiesActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#4442ee10 that was originally added here
07-19 16:22:04.630: E/WindowManager(14776): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:374)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:292)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.Window$LocalWindowManager.addView(Window.java:547)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.Dialog.show(Dialog.java:277)
07-19 16:22:04.630: E/WindowManager(14776): at com.example.realstate.FeaturedPropertiesActivity$DownloadPropertiesList.onPreExecute(FeaturedPropertiesActivity.java:174)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.AsyncTask.execute(AsyncTask.java:534)
07-19 16:22:04.630: E/WindowManager(14776): at com.example.realstate.FeaturedPropertiesActivity.downloadPropertiesList(FeaturedPropertiesActivity.java:98)
07-19 16:22:04.630: E/WindowManager(14776): at com.example.realstate.FeaturedPropertiesActivity.onCreate(FeaturedPropertiesActivity.java:62)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.Activity.performCreate(Activity.java:5008)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.access$600(ActivityThread.java:133)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.Looper.loop(Looper.java:137)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.main(ActivityThread.java:4794)
07-19 16:22:04.630: E/WindowManager(14776): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 16:22:04.630: E/WindowManager(14776): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 16:22:04.630: E/WindowManager(14776): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
07-19 16:22:04.630: E/WindowManager(14776): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
07-19 16:22:04.630: E/WindowManager(14776): at dalvik.system.NativeStart.main(Native Method)
07-19 16:22:05.490: D/dalvikvm(14776): GC_FOR_ALLOC freed 121K, 8% free 43275K/46919K, paused 41ms, total 42ms
07-19 16:22:05.540: D/dalvikvm(14776): GC_BEFORE_OOM freed 17K, 8% free 43257K/46919K, paused 48ms, total 48ms
07-19 16:22:05.540: E/dalvikvm-heap(14776): Out of memory on a 21233680-byte allocation.

Related

Issue with imsdroid integration with my android application

We have problem related with Imsdroid Integration with my android application.During the application startup it gives error as follow..
ExceptionInInitializerError
My log file is:
07-19 19:55:58.047: E/AndroidRuntime(6858): FATAL EXCEPTION: main
07-19 19:55:58.047: E/AndroidRuntime(6858): java.lang.ExceptionInInitializerError
07-19 19:55:58.047: E/AndroidRuntime(6858): at org.doubango.imsdroid.MyMainClass.<init>(MyMainClass.java:43)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.Class.newInstanceImpl(Native Method)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.Class.newInstance(Class.java:1319)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2099)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.access$600(ActivityThread.java:149)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.os.Looper.loop(Looper.java:153)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.main(ActivityThread.java:4987)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 19:55:58.047: E/AndroidRuntime(6858): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
07-19 19:55:58.047: E/AndroidRuntime(6858): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
07-19 19:55:58.047: E/AndroidRuntime(6858): at dalvik.system.NativeStart.main(Native Method)
07-19 19:55:58.047: E/AndroidRuntime(6858): Caused by: java.lang.NullPointerException
07-19 19:55:58.047: E/AndroidRuntime(6858): at org.doubango.ngn.NgnEngine.<clinit>(NgnEngine.java:75)
07-19 19:55:58.047: E/AndroidRuntime(6858): ... 16 more
I think its with your AndroidManifest. Try putting this on your Application tag
android:name="org.doubango.ngn.NgnApplication"
or
if you have a custom Application object extend NgnApplication object instead of Application object.
If you want to use imsdroid in your application then you need to use ChromeView instead of WebView in android xml file.
I found more information and at here
<us.costan.chrome.ChromeView
android:id="#+id/customWebView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>

Postgresql connection to Android app

I am trying to connect postgreSQL, using JBDC, to my Android app.
I have written a small program which will try to connect to the database and then the textView will change to connected.
I know for sure that the url is not correct but I followed this website: http://jdbc.postgresql.org/documentation/80/connect.html and used the first one.
Here is my code:
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import java.sql.*;
import java.util.Properties;
public class MainActivity extends Activity {
private static final String dbname = "postgres";
public static final String USER = " yOUR_DATABASE_USERNAME";
public static final String PASSWORD = "DATABASE_PASSWORD";
TextView text;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
text = (TextView) findViewById(R.id.tvConnect);
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String url = "jdbc:postgresql:localhost:5432/postgres";
Connection conn;
try {
//conn = DriverManager.getConnection(url, USER, PASSWORD);
conn = DriverManager.getConnection(url);
text.setText("Connected");
} catch (SQLException e) {
// TODO Auto-generated catch block
Log.e("Tag", "Description", e);
}
}
}
These are the errors I am getting:
07-19 19:23:46.023: E/Tag(1246): Description
07-19 19:23:46.023: E/Tag(1246): org.postgresql.util.PSQLException: Something unusual has occurred to cause the driver to fail. Please report this exception.
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.Driver.connect(Driver.java:300)
07-19 19:23:46.023: E/Tag(1246): at java.sql.DriverManager.getConnection(DriverManager.java:179)
07-19 19:23:46.023: E/Tag(1246): at java.sql.DriverManager.getConnection(DriverManager.java:144)
07-19 19:23:46.023: E/Tag(1246): at com.sql.postgre.MainActivity.onCreate(MainActivity.java:46)
07-19 19:23:46.023: E/Tag(1246): at android.app.Activity.performCreate(Activity.java:5231)
07-19 19:23:46.023: E/Tag(1246): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.access$800(ActivityThread.java:135)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-19 19:23:46.023: E/Tag(1246): at android.os.Handler.dispatchMessage(Handler.java:102)
07-19 19:23:46.023: E/Tag(1246): at android.os.Looper.loop(Looper.java:136)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-19 19:23:46.023: E/Tag(1246): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 19:23:46.023: E/Tag(1246): at java.lang.reflect.Method.invoke(Method.java:515)
07-19 19:23:46.023: E/Tag(1246): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-19 19:23:46.023: E/Tag(1246): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-19 19:23:46.023: E/Tag(1246): at dalvik.system.NativeStart.main(Native Method)
07-19 19:23:46.023: E/Tag(1246): Caused by: android.os.NetworkOnMainThreadException
07-19 19:23:46.023: E/Tag(1246): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetAddress.getByName(InetAddress.java:289)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetSocketAddress.<init>(InetSocketAddress.java:105)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetSocketAddress.<init>(InetSocketAddress.java:90)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.core.PGStream.<init>(PGStream.java:60)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:101)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.Driver.makeConnection(Driver.java:410)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.Driver.connect(Driver.java:280)
This might be a late answer but after reading about jdbc drivers for android many people have said that the jdbc jar does not work well at all for android and only one or two versions of the jar actually worked. Otherwise the best way of connecting your database with android is via a web service and using either Volley or Retrofit to talk to the database.
Android has built-in support for SQLite database. Please refer to android documentation or you may download this code demo to quickly check how to code it.
Still if it is required to access any other database server, that server must be running on a machine as android does not host any SQL server so localhost should not work, if you are testing your code with emulator use 10.0.2.2 instead of localhost to access your postgres server on host development machine.
Another important issue to take care of while accessing a database server involves network, executing network related code is not allowed to be executed as part of an activity class hence you must write your code in AsyncTask android API.

Problems to find nearby Locations in android

I'm following this tutorial to get nearby location, I followed each and every step as per tutorial. But when I run my app, I'm getting following errors:
10-08 10:57:37.125: E/dalvikvm(758): Could not find class 'com.google.api.client.http.javanet.NetHttpTransport', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.<clinit>
10-08 10:57:37.475: E/dalvikvm(758): Could not find class 'com.androidhive.googleplacesandmaps.GooglePlaces$1', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.createRequestFactory
10-08 10:57:37.515: E/dalvikvm(758): Could not find class 'com.google.api.client.http.GenericUrl', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.getPlaceDetails
10-08 10:57:37.566: E/dalvikvm(758): Could not find class 'com.google.api.client.http.GenericUrl', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.search
10-08 10:57:37.645: E/AndroidRuntime(758): FATAL EXCEPTION: AsyncTask #1
10-08 10:57:37.645: E/AndroidRuntime(758): java.lang.RuntimeException: An error occured while executing doInBackground()
10-08 10:57:37.645: E/AndroidRuntime(758): at android.os.AsyncTask$3.done(AsyncTask.java:266)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.lang.Thread.run(Thread.java:1020)
10-08 10:57:37.645: E/AndroidRuntime(758): Caused by: java.lang.ExceptionInInitializerError
10-08 10:57:37.645: E/AndroidRuntime(758): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.doInBackground(MainActivity.java:170)
10-08 10:57:37.645: E/AndroidRuntime(758): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.doInBackground(MainActivity.java:1)
10-08 10:57:37.645: E/AndroidRuntime(758): at android.os.AsyncTask$2.call(AsyncTask.java:252)
10-08 10:57:37.645: E/AndroidRuntime(758): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
10-08 10:57:37.645: E/AndroidRuntime(758): ... 4 more
10-08 10:57:37.645: E/AndroidRuntime(758): Caused by: java.lang.NoClassDefFoundError: com.google.api.client.http.javanet.NetHttpTransport
10-08 10:57:37.645: E/AndroidRuntime(758): at com.androidhive.googleplacesandmaps.GooglePlaces.<clinit>(GooglePlaces.java:23)
10-08 10:57:37.645: E/AndroidRuntime(758): ... 8 more
10-08 10:57:38.715: E/WindowManager(758): Activity com.androidhive.googleplacesandmaps.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#40936600 that was originally added here
10-08 10:57:38.715: E/WindowManager(758): android.view.WindowLeaked: Activity com.androidhive.googleplacesandmaps.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#40936600 that was originally added here
10-08 10:57:38.715: E/WindowManager(758): at android.view.ViewRoot.<init>(ViewRoot.java:288)
10-08 10:57:38.715: E/WindowManager(758): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:249)
10-08 10:57:38.715: E/WindowManager(758): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:193)
10-08 10:57:38.715: E/WindowManager(758): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:118)
10-08 10:57:38.715: E/WindowManager(758): at android.view.Window$LocalWindowManager.addView(Window.java:532)
10-08 10:57:38.715: E/WindowManager(758): at android.app.Dialog.show(Dialog.java:269)
10-08 10:57:38.715: E/WindowManager(758): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.onPreExecute(MainActivity.java:162)
10-08 10:57:38.715: E/WindowManager(758): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:549)
10-08 10:57:38.715: E/WindowManager(758): at android.os.AsyncTask.execute(AsyncTask.java:499)
10-08 10:57:38.715: E/WindowManager(758): at com.androidhive.googleplacesandmaps.MainActivity.onCreate(MainActivity.java:102)
10-08 10:57:38.715: E/WindowManager(758): at android.app.Activity.performCreate(Activity.java:4397)
10-08 10:57:38.715: E/WindowManager(758): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
10-08 10:57:38.715: E/WindowManager(758): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
10-08 10:57:38.715: E/WindowManager(758): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
10-08 10:57:38.715: E/WindowManager(758): at android.app.ActivityThread.access$500(ActivityThread.java:122)
10-08 10:57:38.715: E/WindowManager(758): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
10-08 10:57:38.715: E/WindowManager(758): at android.os.Handler.dispatchMessage(Handler.java:99)
10-08 10:57:38.715: E/WindowManager(758): at android.os.Looper.loop(Looper.java:132)
10-08 10:57:38.715: E/WindowManager(758): at android.app.ActivityThread.main(ActivityThread.java:4123)
10-08 10:57:38.715: E/WindowManager(758): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 10:57:38.715: E/WindowManager(758): at java.lang.reflect.Method.invoke(Method.java:491)
10-08 10:57:38.715: E/WindowManager(758): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
10-08 10:57:38.715: E/WindowManager(758): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
10-08 10:57:38.715: E/WindowManager(758): at dalvik.system.NativeStart.main(Native Method)
10-08 11:04:08.085: E/dalvikvm(794): Could not find class 'com.google.api.client.http.javanet.NetHttpTransport', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.<clinit>
10-08 11:04:08.435: E/dalvikvm(794): Could not find class 'com.androidhive.googleplacesandmaps.GooglePlaces$1', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.createRequestFactory
10-08 11:04:08.485: E/dalvikvm(794): Could not find class 'com.google.api.client.http.GenericUrl', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.getPlaceDetails
10-08 11:04:08.655: E/dalvikvm(794): Could not find class 'com.google.api.client.http.GenericUrl', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.search
10-08 11:04:08.685: E/AndroidRuntime(794): FATAL EXCEPTION: AsyncTask #1
10-08 11:04:08.685: E/AndroidRuntime(794): java.lang.RuntimeException: An error occured while executing doInBackground()
10-08 11:04:08.685: E/AndroidRuntime(794): at android.os.AsyncTask$3.done(AsyncTask.java:266)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.lang.Thread.run(Thread.java:1020)
10-08 11:04:08.685: E/AndroidRuntime(794): Caused by: java.lang.ExceptionInInitializerError
10-08 11:04:08.685: E/AndroidRuntime(794): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.doInBackground(MainActivity.java:170)
10-08 11:04:08.685: E/AndroidRuntime(794): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.doInBackground(MainActivity.java:1)
10-08 11:04:08.685: E/AndroidRuntime(794): at android.os.AsyncTask$2.call(AsyncTask.java:252)
10-08 11:04:08.685: E/AndroidRuntime(794): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
10-08 11:04:08.685: E/AndroidRuntime(794): ... 4 more
10-08 11:04:08.685: E/AndroidRuntime(794): Caused by: java.lang.NoClassDefFoundError: com.google.api.client.http.javanet.NetHttpTransport
10-08 11:04:08.685: E/AndroidRuntime(794): at com.androidhive.googleplacesandmaps.GooglePlaces.<clinit>(GooglePlaces.java:23)
10-08 11:04:08.685: E/AndroidRuntime(794): ... 8 more
10-08 11:04:09.786: E/WindowManager(794): Activity com.androidhive.googleplacesandmaps.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#409365d0 that was originally added here
10-08 11:04:09.786: E/WindowManager(794): android.view.WindowLeaked: Activity com.androidhive.googleplacesandmaps.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#409365d0 that was originally added here
10-08 11:04:09.786: E/WindowManager(794): at android.view.ViewRoot.<init>(ViewRoot.java:288)
10-08 11:04:09.786: E/WindowManager(794): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:249)
10-08 11:04:09.786: E/WindowManager(794): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:193)
10-08 11:04:09.786: E/WindowManager(794): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:118)
10-08 11:04:09.786: E/WindowManager(794): at android.view.Window$LocalWindowManager.addView(Window.java:532)
10-08 11:04:09.786: E/WindowManager(794): at android.app.Dialog.show(Dialog.java:269)
10-08 11:04:09.786: E/WindowManager(794): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.onPreExecute(MainActivity.java:162)
10-08 11:04:09.786: E/WindowManager(794): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:549)
10-08 11:04:09.786: E/WindowManager(794): at android.os.AsyncTask.execute(AsyncTask.java:499)
10-08 11:04:09.786: E/WindowManager(794): at com.androidhive.googleplacesandmaps.MainActivity.onCreate(MainActivity.java:102)
10-08 11:04:09.786: E/WindowManager(794): at android.app.Activity.performCreate(Activity.java:4397)
10-08 11:04:09.786: E/WindowManager(794): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
10-08 11:04:09.786: E/WindowManager(794): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
10-08 11:04:09.786: E/WindowManager(794): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
10-08 11:04:09.786: E/WindowManager(794): at android.app.ActivityThread.access$500(ActivityThread.java:122)
10-08 11:04:09.786: E/WindowManager(794): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
10-08 11:04:09.786: E/WindowManager(794): at android.os.Handler.dispatchMessage(Handler.java:99)
10-08 11:04:09.786: E/WindowManager(794): at android.os.Looper.loop(Looper.java:132)
10-08 11:04:09.786: E/WindowManager(794): at android.app.ActivityThread.main(ActivityThread.java:4123)
10-08 11:04:09.786: E/WindowManager(794): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 11:04:09.786: E/WindowManager(794): at java.lang.reflect.Method.invoke(Method.java:491)
10-08 11:04:09.786: E/WindowManager(794): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
10-08 11:04:09.786: E/WindowManager(794): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
10-08 11:04:09.786: E/WindowManager(794): at dalvik.system.NativeStart.main(Native Method)
10-08 11:08:51.366: E/dalvikvm(826): Could not find class 'com.google.api.client.http.javanet.NetHttpTransport', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.<clinit>
10-08 11:08:51.806: E/dalvikvm(826): Could not find class 'com.androidhive.googleplacesandmaps.GooglePlaces$1', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.createRequestFactory
10-08 11:08:51.885: E/dalvikvm(826): Could not find class 'com.google.api.client.http.GenericUrl', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.getPlaceDetails
10-08 11:08:51.935: E/dalvikvm(826): Could not find class 'com.google.api.client.http.GenericUrl', referenced from method com.androidhive.googleplacesandmaps.GooglePlaces.search
10-08 11:08:52.035: E/AndroidRuntime(826): FATAL EXCEPTION: AsyncTask #1
10-08 11:08:52.035: E/AndroidRuntime(826): java.lang.RuntimeException: An error occured while executing doInBackground()
10-08 11:08:52.035: E/AndroidRuntime(826): at android.os.AsyncTask$3.done(AsyncTask.java:266)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.lang.Thread.run(Thread.java:1020)
10-08 11:08:52.035: E/AndroidRuntime(826): Caused by: java.lang.ExceptionInInitializerError
10-08 11:08:52.035: E/AndroidRuntime(826): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.doInBackground(MainActivity.java:170)
10-08 11:08:52.035: E/AndroidRuntime(826): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.doInBackground(MainActivity.java:1)
10-08 11:08:52.035: E/AndroidRuntime(826): at android.os.AsyncTask$2.call(AsyncTask.java:252)
10-08 11:08:52.035: E/AndroidRuntime(826): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
10-08 11:08:52.035: E/AndroidRuntime(826): ... 4 more
10-08 11:08:52.035: E/AndroidRuntime(826): Caused by: java.lang.NoClassDefFoundError: com.google.api.client.http.javanet.NetHttpTransport
10-08 11:08:52.035: E/AndroidRuntime(826): at com.androidhive.googleplacesandmaps.GooglePlaces.<clinit>(GooglePlaces.java:23)
10-08 11:08:52.035: E/AndroidRuntime(826): ... 8 more
10-08 11:08:53.145: E/WindowManager(826): Activity com.androidhive.googleplacesandmaps.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#40936608 that was originally added here
10-08 11:08:53.145: E/WindowManager(826): android.view.WindowLeaked: Activity com.androidhive.googleplacesandmaps.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#40936608 that was originally added here
10-08 11:08:53.145: E/WindowManager(826): at android.view.ViewRoot.<init>(ViewRoot.java:288)
10-08 11:08:53.145: E/WindowManager(826): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:249)
10-08 11:08:53.145: E/WindowManager(826): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:193)
10-08 11:08:53.145: E/WindowManager(826): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:118)
10-08 11:08:53.145: E/WindowManager(826): at android.view.Window$LocalWindowManager.addView(Window.java:532)
10-08 11:08:53.145: E/WindowManager(826): at android.app.Dialog.show(Dialog.java:269)
10-08 11:08:53.145: E/WindowManager(826): at com.androidhive.googleplacesandmaps.MainActivity$LoadPlaces.onPreExecute(MainActivity.java:162)
10-08 11:08:53.145: E/WindowManager(826): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:549)
10-08 11:08:53.145: E/WindowManager(826): at android.os.AsyncTask.execute(AsyncTask.java:499)
10-08 11:08:53.145: E/WindowManager(826): at com.androidhive.googleplacesandmaps.MainActivity.onCreate(MainActivity.java:102)
10-08 11:08:53.145: E/WindowManager(826): at android.app.Activity.performCreate(Activity.java:4397)
10-08 11:08:53.145: E/WindowManager(826): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
10-08 11:08:53.145: E/WindowManager(826): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
10-08 11:08:53.145: E/WindowManager(826): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
10-08 11:08:53.145: E/WindowManager(826): at android.app.ActivityThread.access$500(ActivityThread.java:122)
10-08 11:08:53.145: E/WindowManager(826): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
10-08 11:08:53.145: E/WindowManager(826): at android.os.Handler.dispatchMessage(Handler.java:99)
10-08 11:08:53.145: E/WindowManager(826): at android.os.Looper.loop(Looper.java:132)
10-08 11:08:53.145: E/WindowManager(826): at android.app.ActivityThread.main(ActivityThread.java:4123)
10-08 11:08:53.145: E/WindowManager(826): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 11:08:53.145: E/WindowManager(826): at java.lang.reflect.Method.invoke(Method.java:491)
10-08 11:08:53.145: E/WindowManager(826): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
10-08 11:08:53.145: E/WindowManager(826): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
10-08 11:08:53.145: E/WindowManager(826): at dalvik.system.NativeStart.main(Native Method)
I searched to solve errors, but can't succeeded. How can I overcome those errors?
Or Can anyone provide me better solution to find nearby location?
Your jars are not being added properly. You must explicit add library reference of google-http-client-1.5.0-beta.jar(right click project->Properties->Java Build Path->Add External JARs), don't believe class path. If you do not do this, in the apk file does not contain the required data.
You can download Google plus library from here
Hmm... not working...??? Make sure one more thing as in pic that all options are checked e.g :

Error on post message to the facebook wall in android 4.0.3

I try to post message on user facebook wall. It's work on previous platform versions, but on Android 4.0.3 I have error:
07-19 14:53:02.945: W/System.err(29740): java.net.UnknownHostException: Unable to resolve host "graph.facebook.com": No address associated with hostname
07-19 14:53:02.965: W/System.err(29740): at java.net.InetAddress.lookupHostByName(InetAddress.java:436)
07-19 14:53:02.965: W/System.err(29740): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:245)
07-19 14:53:02.965: W/System.err(29740): at java.net.InetAddress.getAllByName(InetAddress.java:220)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:71)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:460)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:441)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
07-19 14:53:02.965: W/System.err(29740): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
07-19 14:53:02.975: W/System.err(29740): at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80)
07-19 14:53:02.975: W/System.err(29740): at libcore.net.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:164)
07-19 14:53:02.975: W/System.err(29740): at com.facebook.android.Util.openUrl(Util.java:193)
07-19 14:53:02.975: W/System.err(29740): at com.facebook.android.Facebook.request(Facebook.java:751)
07-19 14:53:02.975: W/System.err(29740): at com.koloneme.socialnetworking.FacebookUtility.postOnWall(FacebookUtility.java:115)
07-19 14:53:02.975: W/System.err(29740): at com.koloneme.socialnetworking.FacebookUtility.facebookAuthorization(FacebookUtility.java:65)
07-19 14:53:02.975: W/System.err(29740): at com.koloneme.socialnetworking.FacebookActivity.onCreate(FacebookActivity.java:33)
07-19 14:53:02.975: W/System.err(29740): at android.app.Activity.performCreate(Activity.java:4538)
07-19 14:53:02.975: W/System.err(29740): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
07-19 14:53:02.975: W/System.err(29740): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2158)
07-19 14:53:02.975: W/System.err(29740): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2237)
07-19 14:53:02.975: W/System.err(29740): at android.app.ActivityThread.access$600(ActivityThread.java:139)
07-19 14:53:02.975: W/System.err(29740): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
07-19 14:53:02.975: W/System.err(29740): at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 14:53:02.975: W/System.err(29740): at android.os.Looper.loop(Looper.java:154)
07-19 14:53:02.975: W/System.err(29740): at android.app.ActivityThread.main(ActivityThread.java:4974)
07-19 14:53:02.975: W/System.err(29740): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 14:53:02.975: W/System.err(29740): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 14:53:02.975: W/System.err(29740): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-19 14:53:02.975: W/System.err(29740): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-19 14:53:02.975: W/System.err(29740): at dalvik.system.NativeStart.main(Native Method)
07-19 14:53:02.975: W/System.err(29740): Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
07-19 14:53:02.975: W/System.err(29740): at libcore.io.Posix.getaddrinfo(Native Method)
07-19 14:53:02.975: W/System.err(29740): at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:55)
07-19 14:53:02.975: W/System.err(29740): at java.net.InetAddress.lookupHostByName(InetAddress.java:421)
07-19 14:53:02.975: W/System.err(29740): ... 33 more
07-19 14:53:03.075: W/webcore(29740): java.lang.Throwable: EventHub.removeMessages(int what = 105) is not supported before the WebViewCore is set up.
07-19 14:53:03.075: W/webcore(29740): at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1889)
07-19 14:53:03.075: W/webcore(29740): at android.webkit.WebViewCore$EventHub.access$8500(WebViewCore.java:973)
07-19 14:53:03.075: W/webcore(29740): at android.webkit.WebViewCore.removeMessages(WebViewCore.java:2088)
07-19 14:53:03.075: W/webcore(29740): at android.webkit.WebView.sendViewSizeZoom(WebView.java:3450)
07-19 14:53:03.075: W/webcore(29740): at android.webkit.ZoomManager.setZoomScale(ZoomManager.java:679)
07-19 14:53:03.075: W/webcore(29740): at android.webkit.ZoomManager.access$1900(ZoomManager.java:59)
07-19 14:53:03.075: W/webcore(29740): at android.webkit.ZoomManager$PostScale.run(ZoomManager.java:1174)
07-19 14:53:03.075: W/webcore(29740): at android.os.Handler.handleCallback(Handler.java:607)
07-19 14:53:03.075: W/webcore(29740): at android.os.Handler.dispatchMessage(Handler.java:92)
07-19 14:53:03.075: W/webcore(29740): at android.os.Looper.loop(Looper.java:154)
07-19 14:53:03.075: W/webcore(29740): at android.app.ActivityThread.main(ActivityThread.java:4974)
07-19 14:53:03.075: W/webcore(29740): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 14:53:03.075: W/webcore(29740): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 14:53:03.075: W/webcore(29740): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-19 14:53:03.075: W/webcore(29740): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-19 14:53:03.075: W/webcore(29740): at dalvik.system.NativeStart.main(Native Method)
I'm using this facebook sdk -https://github.com/facebook/facebook-android-sdk/
Here is my code to posting message on wall:
private static void postOnWall(String msg) {
Log.d(LOGTAG, "Testing graph API wall post");
try {
// String response = facebook.request("me");
Bundle parameters = new Bundle();
parameters.putString("message", msg);
parameters.putString("description", "test test test");
String response = facebook.request("me/feed", parameters,
"POST");
Log.d(LOGTAG, "got response: " + response);
if (response == null || response.equals("") ||
response.equals("false")) {
Log.v(LOGTAG, " error Blank response");
}
} catch(Exception e) {
e.printStackTrace();
}
}
There are three reasons that you would get this exception:
You have not declared the internet permission in your manifest
The device does not have an internet connection, or has one which blocks facebook access at the DNS level. Try using a home network if you're behind a company porxy.
Facebook's server's are temporarily not working.
i get
got response: {"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}

Why is findFragmentById() returning null?

In the method below, NasaDailyFragment is always null in the debugger. The method call NasaDailyFragment.onRefresh(); fails using because of this. I can't figure out why its null.
public class NasaAppActivity extends FragmentActivity {
//other methods
public void onRefreshClicked(View view){
Log.d("debug", "in run");
FragmentManager fragmentManager=getSupportFragmentManager();
NasaDailyImage NasaDailyFragment=(NasaDailyImage)fragmentManager.findFragmentById(R.id.fragment_iotd);
if(NasaDailyFragment!=null){
Log.d("debug", "fragment has been casted and is NOT null!!!");
}
NasaDailyFragment.onRefresh();//always crashes here because NasaDailyFragment is null, this is "line 40" of the code
}
}
Here's the xml for the fragment defined by R.id.fragment_iotd
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment android:name="com.wajumbie.nasadailyimage.NasaDailyImage"
android:id="#+id/fragment_iotd"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
The logcat output
07-19 11:21:25.916: D/debug(534): in run
07-19 11:21:25.916: D/AndroidRuntime(534): Shutting down VM
07-19 11:21:25.916: W/dalvikvm(534): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
07-19 11:21:25.936: E/AndroidRuntime(534): FATAL EXCEPTION: main
07-19 11:21:25.936: E/AndroidRuntime(534): java.lang.IllegalStateException: Could not execute method of the activity
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$1.onClick(View.java:3044)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View.performClick(View.java:3511)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$PerformClick.run(View.java:14105)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Handler.handleCallback(Handler.java:605)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Handler.dispatchMessage(Handler.java:92)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Looper.loop(Looper.java:137)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 11:21:25.936: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-19 11:21:25.936: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-19 11:21:25.936: E/AndroidRuntime(534): at dalvik.system.NativeStart.main(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): Caused by: java.lang.reflect.InvocationTargetException
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$1.onClick(View.java:3039)
07-19 11:21:25.936: E/AndroidRuntime(534): ... 11 more
07-19 11:21:25.936: E/AndroidRuntime(534): Caused by: java.lang.NullPointerException
07-19 11:21:25.936: E/AndroidRuntime(534): at com.wajumbie.nasadailyimage.NasaAppActivity.onRefreshClicked(NasaAppActivity.java:40)
07-19 11:21:25.936: E/AndroidRuntime(534): ... 14 more
07-19 11:21:26.556: I/dalvikvm(534): threadid=3: reacting to signal 3
07-19 11:21:26.586: I/dalvikvm(534): Wrote stack traces to '/data/anr/traces.txt'

Categories

Resources