I have a small problem which i couldn't resolve it by myself. When i launch the app in the emulator, it works fine, but when I try to launch it on device ( SE X10, and Galaxy ACE) the app runs for 2 seconds and crashes. I think it's adMob problem but ..
Here is the logcat:
07-11 01:45:05.536: W/Ads(1210): java.net.ConnectException: googleads.g.doubleclick.net/127.0.0.1:80 - Connection refused
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:207)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:437)
07-11 01:45:05.536: W/Ads(1210): at java.net.Socket.connect(Socket.java:983)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:75)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:48)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:322)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:89)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:294)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:276)
07-11 01:45:05.536: W/Ads(1210): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:214)
07-11 01:45:05.536: W/Ads(1210): at b.a(Unknown Source)
07-11 01:45:05.536: W/Ads(1210): at b.doInBackground(Unknown Source)
07-11 01:45:05.536: W/Ads(1210): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-11 01:45:05.536: W/Ads(1210): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-11 01:45:05.536: W/Ads(1210): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-11 01:45:05.536: W/Ads(1210): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-11 01:45:05.536: W/Ads(1210): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-11 01:45:05.536: W/Ads(1210): at java.lang.Thread.run(Thread.java:1019)
07-11 01:45:05.536: I/Ads(1210): onFailedToReceiveAd(A network error occurred.)
07-11 01:45:07.826: D/AndroidRuntime(1210): Shutting down VM
07-11 01:45:07.826: W/dalvikvm(1210): threadid=1: thread exiting with uncaught exception (group=0x4001d560)
07-11 01:45:07.856: E/AndroidRuntime(1210): FATAL EXCEPTION: main
07-11 01:45:07.856: E/AndroidRuntime(1210): java.lang.NullPointerException
07-11 01:45:07.856: E/AndroidRuntime(1210): at com.taiic.template.admob.adMain.updateLocation(adMain.java:94)
07-11 01:45:07.856: E/AndroidRuntime(1210): at com.taiic.template.admob.adMain$1.onLocationChanged(adMain.java:45)
07-11 01:45:07.856: E/AndroidRuntime(1210): at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:227)
07-11 01:45:07.856: E/AndroidRuntime(1210): at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:160)
07-11 01:45:07.856: E/AndroidRuntime(1210): at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:176)
07-11 01:45:07.856: E/AndroidRuntime(1210): at android.os.Handler.dispatchMessage(Handler.java:99)
07-11 01:45:07.856: E/AndroidRuntime(1210): at android.os.Looper.loop(Looper.java:123)
07-11 01:45:07.856: E/AndroidRuntime(1210): at android.app.ActivityThread.main(ActivityThread.java:3701)
07-11 01:45:07.856: E/AndroidRuntime(1210): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 01:45:07.856: E/AndroidRuntime(1210): at java.lang.reflect.Method.invoke(Method.java:507)
07-11 01:45:07.856: E/AndroidRuntime(1210): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
07-11 01:45:07.856: E/AndroidRuntime(1210): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
07-11 01:45:07.856: E/AndroidRuntime(1210): at dalvik.system.NativeStart.main(Native Method)
07-11 01:45:07.876: I/Process(1210): Sending signal. PID: 1210 SIG: 9