Problems to find nearby Locations in android - 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 :

Related

app crashes while fetching images from server on some devices

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.

phonegap device ready function not getting called

I'm relatively new to PhoneGap Android, I've an iPhone application and need to migrate to Android one I've added www from iPhone application to my Android application and added the permissions to manifest as well and even copied the XML folder with config.xml and cordova.xml but the problem is that my device ready function is not getting called
Here is my code for index.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link
href="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.css"
rel="stylesheet" />
<script src="scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<link href="css/style.css" type="text/css" rel="stylesheet" />
<link href="css/index.css" type="text/css" rel="stylesheet" />
<script src="scripts/app.js" type="text/javascript"></script>
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript"
src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
<script src="scripts/gallery_handler.js" type="text/javascript"></script>
<script src="scripts/itpoverlay.js" type="text/javascript"></script>
<script src="scripts/sqlite.js" type="text/javascript"></script>
<script src="scripts/jquery.exif.js" type="text/javascript"></script>
</head>
<body id="body">
<div class="app" style="display: none;">
<div id="deviceready">
<p class="status pending blink">Connecting to Device</p>
<p class="status complete blink hide">Device is Ready</p>
</div>
</div>
<div data-role="page" id="gallerypage" data-theme="a">
<div data-role="header">
<h1 class="headtitle">NG DESIIGNS</h1>
</div>
<div data-role="content" id="pagecontent">
<ul id="gallery" class="gallery">
</ul>
</div>
</div>
<script type="text/javascript" src="cordova-2.0.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
alert("app to be initialized");
app.initialize();
document.addEventListener('deviceready', function() {
alert("device ready called");
db.transaction(queryDB, errorCB, successCB);
}, false);
document.addEventListener("offline", function() {
alert("Your Device is offline");
}, false);
</script>
</body>
</html>
And here is index.js
var app = {
initialize: function() {
alert("index.js bind");
this.bind();
},
bind: function() {
alert("index.js bind function calld device ready");
document.addEventListener('deviceready', this.deviceready, false);
},
deviceready: function() {
alert("device ready");
// note that this is an event handler so the scope is that of the event
// so we need to call app.report(), and not this.report()
app.report('deviceready');
},
report: function(id) {
console.log("report:" + id);
// hide the .pending <p> and show the .complete <p>
document.querySelector('#' + id + ' .pending').className += ' hide';
var completeElem = document.querySelector('#' + id + ' .complete');
completeElem.className = completeElem.className.split('hide').join('');
}
};
Also see logcat
0-08 10:46:32.294: I/dalvikvm(763): threadid=3: reacting to signal 3
10-08 10:46:32.414: I/dalvikvm(763): Wrote stack traces to '/data/anr/traces.txt'
10-08 10:46:32.664: D/CordovaLog(763): Found preference for phonegap-version=2.0.0
10-08 10:46:32.673: D/CordovaLog(763): Found preference for orientation=default
10-08 10:46:32.673: D/CordovaLog(763): Found preference for target-device=universal
10-08 10:46:32.683: D/CordovaLog(763): Found preference for fullscreen=false
10-08 10:46:32.703: D/JsMessageQueue(763): Set native->JS mode to 1
10-08 10:46:32.803: I/dalvikvm(763): threadid=3: reacting to signal 3
10-08 10:46:32.873: I/dalvikvm(763): Wrote stack traces to '/data/anr/traces.txt'
10-08 10:46:32.934: W/webcore(763): java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.
10-08 10:46:32.934: W/webcore(763): at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1683)
10-08 10:46:32.934: W/webcore(763): at android.webkit.WebViewCore$EventHub.access$7900(WebViewCore.java:926)
10-08 10:46:32.934: W/webcore(763): at android.webkit.WebViewCore.removeMessages(WebViewCore.java:1795)
10-08 10:46:32.934: W/webcore(763): at android.webkit.WebView.sendOurVisibleRect(WebView.java:2917)
10-08 10:46:32.934: W/webcore(763): at android.webkit.ZoomManager.setZoomScale(ZoomManager.java:593)
10-08 10:46:32.934: W/webcore(763): at android.webkit.ZoomManager.access$1700(ZoomManager.java:49)
10-08 10:46:32.934: W/webcore(763): at android.webkit.ZoomManager$PostScale.run(ZoomManager.java:984)
10-08 10:46:32.934: W/webcore(763): at android.os.Handler.handleCallback(Handler.java:605)
10-08 10:46:32.934: W/webcore(763): at android.os.Handler.dispatchMessage(Handler.java:92)
10-08 10:46:32.934: W/webcore(763): at android.os.Looper.loop(Looper.java:137)
10-08 10:46:32.934: W/webcore(763): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-08 10:46:32.934: W/webcore(763): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 10:46:32.934: W/webcore(763): at java.lang.reflect.Method.invoke(Method.java:511)
10-08 10:46:32.934: W/webcore(763): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-08 10:46:32.934: W/webcore(763): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-08 10:46:32.934: W/webcore(763): at dalvik.system.NativeStart.main(Native Method)
10-08 10:46:32.964: D/gralloc_goldfish(763): Emulator without GPU emulation detected.
10-08 10:46:33.823: D/dalvikvm(763): GC_CONCURRENT freed 115K, 3% free 6838K/7047K, paused 4ms+4ms
10-08 10:46:41.603: I/SqliteDatabaseCpp(763): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/com.example.phonegapapp/databases/webview.db
10-08 10:46:41.603: I/SqliteDatabaseCpp(763): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27701 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/com.example.phonegapapp/databases/webview.db
10-08 10:46:41.994: E/Cordova(763): Error loading url gap://ready
10-08 10:46:41.994: E/Cordova(763): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=gap://ready }
10-08 10:46:41.994: E/Cordova(763): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
10-08 10:46:41.994: E/Cordova(763): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
10-08 10:46:41.994: E/Cordova(763): at android.app.Activity.startActivityForResult(Activity.java:3190)
10-08 10:46:41.994: E/Cordova(763): at android.app.Activity.startActivity(Activity.java:3297)
10-08 10:46:41.994: E/Cordova(763): at org.apache.cordova.CordovaWebViewClient.shouldOverrideUrlLoading(CordovaWebViewClient.java:222)
10-08 10:46:41.994: E/Cordova(763): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:224)
10-08 10:46:41.994: E/Cordova(763): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:324)
10-08 10:46:41.994: E/Cordova(763): at android.os.Handler.dispatchMessage(Handler.java:99)
10-08 10:46:41.994: E/Cordova(763): at android.os.Looper.loop(Looper.java:137)
10-08 10:46:41.994: E/Cordova(763): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-08 10:46:41.994: E/Cordova(763): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 10:46:41.994: E/Cordova(763): at java.lang.reflect.Method.invoke(Method.java:511)
10-08 10:46:41.994: E/Cordova(763): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-08 10:46:41.994: E/Cordova(763): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-08 10:46:41.994: E/Cordova(763): at dalvik.system.NativeStart.main(Native Method)
10-08 10:46:43.553: E/libEGL(763): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:46:43.553: D/ShaderProgram(763): couldn't load the vertex shader!
10-08 10:46:43.553: E/libEGL(763): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:46:43.553: D/ShaderProgram(763): couldn't load the vertex shader!
10-08 10:46:43.553: E/libEGL(763): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:46:43.553: D/ShaderProgram(763): couldn't load the vertex shader!
10-08 10:46:43.553: E/libEGL(763): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:46:43.553: D/ShaderProgram(763): couldn't load the vertex shader!
10-08 10:46:43.553: E/libEGL(763): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:46:43.553: D/ShaderProgram(763): couldn't load the vertex shader!
10-08 10:51:48.393: I/dalvikvm(828): threadid=3: reacting to signal 3
10-08 10:51:48.413: I/dalvikvm(828): Wrote stack traces to '/data/anr/traces.txt'
10-08 10:51:48.674: D/CordovaLog(828): Found preference for phonegap-version=2.0.0
10-08 10:51:48.694: D/CordovaLog(828): Found preference for orientation=default
10-08 10:51:48.694: D/CordovaLog(828): Found preference for target-device=universal
10-08 10:51:48.694: D/CordovaLog(828): Found preference for fullscreen=false
10-08 10:51:48.704: D/JsMessageQueue(828): Set native->JS mode to 1
10-08 10:51:48.893: I/dalvikvm(828): threadid=3: reacting to signal 3
10-08 10:51:48.934: W/webcore(828): java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.
10-08 10:51:48.934: W/webcore(828): at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1683)
10-08 10:51:48.934: W/webcore(828): at android.webkit.WebViewCore$EventHub.access$7900(WebViewCore.java:926)
10-08 10:51:48.934: W/webcore(828): at android.webkit.WebViewCore.removeMessages(WebViewCore.java:1795)
10-08 10:51:48.934: W/webcore(828): at android.webkit.WebView.sendOurVisibleRect(WebView.java:2917)
10-08 10:51:48.934: W/webcore(828): at android.webkit.ZoomManager.setZoomScale(ZoomManager.java:593)
10-08 10:51:48.934: W/webcore(828): at android.webkit.ZoomManager.access$1700(ZoomManager.java:49)
10-08 10:51:48.934: W/webcore(828): at android.webkit.ZoomManager$PostScale.run(ZoomManager.java:984)
10-08 10:51:48.934: W/webcore(828): at android.os.Handler.handleCallback(Handler.java:605)
10-08 10:51:48.934: W/webcore(828): at android.os.Handler.dispatchMessage(Handler.java:92)
10-08 10:51:48.934: W/webcore(828): at android.os.Looper.loop(Looper.java:137)
10-08 10:51:48.934: W/webcore(828): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-08 10:51:48.934: W/webcore(828): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 10:51:48.934: W/webcore(828): at java.lang.reflect.Method.invoke(Method.java:511)
10-08 10:51:48.934: W/webcore(828): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-08 10:51:48.934: W/webcore(828): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-08 10:51:48.934: W/webcore(828): at dalvik.system.NativeStart.main(Native Method)
10-08 10:51:48.954: D/gralloc_goldfish(828): Emulator without GPU emulation detected.
10-08 10:51:48.954: I/dalvikvm(828): Wrote stack traces to '/data/anr/traces.txt'
10-08 10:51:49.764: D/dalvikvm(828): GC_CONCURRENT freed 119K, 3% free 6839K/7047K, paused 4ms+3ms
10-08 10:52:10.864: I/SqliteDatabaseCpp(828): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/com.example.phonegapapp/databases/webview.db
10-08 10:52:10.874: I/SqliteDatabaseCpp(828): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27701 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/com.example.phonegapapp/databases/webview.db
10-08 10:52:11.233: E/Cordova(828): Error loading url gap://ready
10-08 10:52:11.233: E/Cordova(828): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=gap://ready }
10-08 10:52:11.233: E/Cordova(828): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
10-08 10:52:11.233: E/Cordova(828): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
10-08 10:52:11.233: E/Cordova(828): at android.app.Activity.startActivityForResult(Activity.java:3190)
10-08 10:52:11.233: E/Cordova(828): at android.app.Activity.startActivity(Activity.java:3297)
10-08 10:52:11.233: E/Cordova(828): at org.apache.cordova.CordovaWebViewClient.shouldOverrideUrlLoading(CordovaWebViewClient.java:222)
10-08 10:52:11.233: E/Cordova(828): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:224)
10-08 10:52:11.233: E/Cordova(828): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:324)
10-08 10:52:11.233: E/Cordova(828): at android.os.Handler.dispatchMessage(Handler.java:99)
10-08 10:52:11.233: E/Cordova(828): at android.os.Looper.loop(Looper.java:137)
10-08 10:52:11.233: E/Cordova(828): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-08 10:52:11.233: E/Cordova(828): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 10:52:11.233: E/Cordova(828): at java.lang.reflect.Method.invoke(Method.java:511)
10-08 10:52:11.233: E/Cordova(828): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-08 10:52:11.233: E/Cordova(828): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-08 10:52:11.233: E/Cordova(828): at dalvik.system.NativeStart.main(Native Method)
10-08 10:52:12.824: E/libEGL(828): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:52:12.824: D/ShaderProgram(828): couldn't load the vertex shader!
10-08 10:52:12.824: E/libEGL(828): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:52:12.824: D/ShaderProgram(828): couldn't load the vertex shader!
10-08 10:52:12.824: E/libEGL(828): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:52:12.824: D/ShaderProgram(828): couldn't load the vertex shader!
10-08 10:52:12.834: E/libEGL(828): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:52:12.834: D/ShaderProgram(828): couldn't load the vertex shader!
10-08 10:52:12.834: E/libEGL(828): call to OpenGL ES API with no current context (logged once per thread)
10-08 10:52:12.834: D/ShaderProgram(828): couldn't load the vertex shader!
You have to change the cordova.js in your www folder to the one of android cordova.js
This is wher the error is being caused:
10-08 10:46:41.994: E/Cordova(763): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=gap://ready }
The system is not able to find an intent that will handle the display of data by calling the deviceReady() function. This leads me to beleive you might have an error in your project setup.
Double check if you have set everything up using this guide
Make sure you have reversed any iphone specific changes you might have made to your setup files etc whenmigrating your code form ios to android.

To set custom zoom buttons in Google Map app on android stopped Unexpectedly

I use below code from Using Google Maps in Android to create app with googlemaps api but exceptions error.
mapView = (MapView) findViewById(R.id.mapView);
LinearLayout zoomLayout = (LinearLayout) findViewById(R.id.zoom);
View zoomView = mapView.getZoomControls();
zoomLayout.removeAllViews();
zoomLayout.addView(zoomView, new LinearLayout.LayoutParams(
android.widget.LinearLayout.LayoutParams.WRAP_CONTENT,
android.widget.LinearLayout.LayoutParams.WRAP_CONTENT));
mapView.displayZoomControls(true);
mapView are defined as private in public class MapsActivity extends MapActivity.
at View zoomView = mapView.getZoomControls(); eclipse show this warning : The method getZoomControls() from the type MapView is deprecated
logCat is:
10-08 15:27:47.606: D/dalvikvm(428): GC_FOR_MALLOC freed 4774 objects / 299864 bytes in 88ms
10-08 15:27:47.826: D/dalvikvm(428): GC_FOR_MALLOC freed 9901 objects / 603608 bytes in 68ms
10-08 15:27:48.016: D/dalvikvm(428): GC_FOR_MALLOC freed 4954 objects / 323936 bytes in 67ms
10-08 15:27:48.226: D/dalvikvm(428): GC_FOR_MALLOC freed 6199 objects / 378152 bytes in 67ms
10-08 15:27:48.466: D/dalvikvm(428): GC_FOR_MALLOC freed 8551 objects / 651664 bytes in 63ms
10-08 15:27:48.676: D/dalvikvm(428): GC_FOR_MALLOC freed 6074 objects / 370080 bytes in 60ms
10-08 15:27:48.716: D/AndroidRuntime(428): Shutting down VM
10-08 15:27:48.716: W/dalvikvm(428): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-08 15:27:48.736: E/AndroidRuntime(428): FATAL EXCEPTION: main
10-08 15:27:48.736: E/AndroidRuntime(428): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.avizhegroup.googlemaps/com.avizhegroup.googlemaps.MapsActivity}: android.view.InflateException: Binary XML file line #14: Error inflating class linearLayout
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.os.Handler.dispatchMessage(Handler.java:99)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.os.Looper.loop(Looper.java:123)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.ActivityThread.main(ActivityThread.java:4627)
10-08 15:27:48.736: E/AndroidRuntime(428): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 15:27:48.736: E/AndroidRuntime(428): at java.lang.reflect.Method.invoke(Method.java:521)
10-08 15:27:48.736: E/AndroidRuntime(428): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-08 15:27:48.736: E/AndroidRuntime(428): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-08 15:27:48.736: E/AndroidRuntime(428): at dalvik.system.NativeStart.main(Native Method)
10-08 15:27:48.736: E/AndroidRuntime(428): Caused by: android.view.InflateException: Binary XML file line #14: Error inflating class linearLayout
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
10-08 15:27:48.736: E/AndroidRuntime(428): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.Activity.setContentView(Activity.java:1647)
10-08 15:27:48.736: E/AndroidRuntime(428): at com.avizhegroup.googlemaps.MapsActivity.onCreate(MapsActivity.java:33)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
10-08 15:27:48.736: E/AndroidRuntime(428): ... 11 more
10-08 15:27:48.736: E/AndroidRuntime(428): Caused by: java.lang.ClassNotFoundException: android.view.linearLayout in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.avizhegroup.googlemaps-1.apk]
10-08 15:27:48.736: E/AndroidRuntime(428): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
10-08 15:27:48.736: E/AndroidRuntime(428): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
10-08 15:27:48.736: E/AndroidRuntime(428): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
10-08 15:27:48.736: E/AndroidRuntime(428): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
10-08 15:27:48.736: E/AndroidRuntime(428): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
10-08 15:27:48.736: E/AndroidRuntime(428): ... 20 more
10-08 15:27:50.956: I/Process(428): Sending signal. PID: 428 SIG: 9
before customize zoom button map run and show correctly. How can i fix this? thanks.
map.setBuiltInZoomControls(true);
Try it.

Memory leaks in android

I am developing an application that deals with storing lot of images in cache, I frequently encounter error like - out of memory. Can anyone suggest a way to deal with this issue
Error Log
Report of logcat :
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): FATAL EXCEPTION: main
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:450)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:326)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.content.res.Resources.loadDrawable(Resources.java:1709)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.content.res.Resources.getDrawable(Resources.java:581)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.view.View.setBackgroundResource(View.java:7533)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at com.lht.icruise.activity.shipdetails.ShipDetailsActivity.onCreate(ShipDetailsActivity.java:99)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.os.Handler.dispatchMessage(Handler.java:99)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.os.Looper.loop(Looper.java:123)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at android.app.ActivityThread.main(ActivityThread.java:3647)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at java.lang.reflect.Method.invokeNative(Native Method)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at java.lang.reflect.Method.invoke(Method.java:507)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-27 19:41:16.425: ERROR/AndroidRuntime(13965): at dalvik.system.NativeStart.main(Native Method)
If you using large bitmaps, recycling the bitmaps to free up memory using recycle() method on bitmap when that bitmap no more used, might help you.
Check if this answer helps you: Strange out of memory issue while loading an image to a Bitmap object

Android Activity Not Found Exception Doesn't Make Sense

Okay well I'm trying to make a Live Wallapper but whenever I click on settings it force closes. Saying the activity is not found which doesn't make any sense because, I have it in the Manifest. This is really starting to bug me as I've been at it for over 2 hours.
Logcat:08-28 01:06:49.903: INFO/ActivityManager(1089): Starting activity: Intent { cmp=quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers (has extras) }
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): FATAL EXCEPTION: main
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): java.lang.IllegalStateException: Could not execute method of the activity
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$1.onClick(View.java:2072)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View.performClick(View.java:2408)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$PerformClick.run(View.java:8816)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Handler.handleCallback(Handler.java:587)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Handler.dispatchMessage(Handler.java:92)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Looper.loop(Looper.java:123)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invoke(Method.java:521)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at dalvik.system.NativeStart.main(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): Caused by: java.lang.reflect.InvocationTargetException
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invoke(Method.java:521)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$1.onClick(View.java:2067)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): ... 11 more
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers}; have you declared this activity in your AndroidManifest.xml?
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Activity.startActivityForResult(Activity.java:2817)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Activity.startActivity(Activity.java:2923)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): ... 15 more
Manifest:`
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
`
Your code starting an Activity. You have to mention this Activity in your AndroidManifest.xml.
like:
<activity android:name="your.package.name.ActivityClassName">
</activity>
Here is part of interest:
ERROR/AndroidRuntime(15221): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers}; have you declared this activity in your AndroidManifest.xml? 08-28

Categories

Resources