I've just downloaded iosched app, to investigate how it handles switching between phone and tablet layouts:
I used EGit and there was an error:
Android requires compiler compliance level 5.0 or 6.0. Found '1.6'
I fixed it easely thanks to this question and Ted Hopp's answer.
Now the project compiled, but right at the start it crashes:
07-11 02:23:37.266: E/AndroidRuntime(1881): FATAL EXCEPTION: main
07-11 02:23:37.266: E/AndroidRuntime(1881):
java.lang.RuntimeException: Unable to get provider
com.google.android.apps.iosched.provider.ScheduleProvider:
java.lang.ClassNotFoundException:
com.google.android.apps.iosched.provider.ScheduleProvider in loader
dalvik.system.PathClassLoader[/data/app/com.google.android.apps.iosched-1.apk]
07-11 02:23:37.266: E/AndroidRuntime(1881): at
android.app.ActivityThread.installProvider(ActivityThread.java:3865)
07-11 02:23:37.266: E/AndroidRuntime(1881): at
android.app.ActivityThread.installContentProviders(ActivityThread.java:3617)
07-11 02:23:37.266: E/AndroidRuntime(1881): at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:3573)
07-11 02:23:37.266: E/AndroidRuntime(1881): at
android.app.ActivityThread.access$2200(ActivityThread.java:123) 07-11
02:23:37.266: E/AndroidRuntime(1881): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1031)
07-11 02:23:37.266: E/AndroidRuntime(1881): at
android.os.Handler.dispatchMessage(Handler.java:99) 07-11
02:23:37.266: E/AndroidRuntime(1881): at
android.os.Looper.loop(Looper.java:126) 07-11 02:23:37.266:
E/AndroidRuntime(1881): at
android.app.ActivityThread.main(ActivityThread.java:3997) 07-11
02:23:37.266: E/AndroidRuntime(1881): at
java.lang.reflect.Method.invokeNative(Native Method) 07-11
02:23:37.266: E/AndroidRuntime(1881): at
java.lang.reflect.Method.invoke(Method.java:491) 07-11 02:23:37.266:
E/AndroidRuntime(1881): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
07-11 02:23:37.266: E/AndroidRuntime(1881): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) 07-11
02:23:37.266: E/AndroidRuntime(1881): at
dalvik.system.NativeStart.main(Native Method) 07-11 02:23:37.266:
E/AndroidRuntime(1881): Caused by: java.lang.ClassNotFoundException:
com.google.android.apps.iosched.provider.ScheduleProvider in loader
dalvik.system.PathClassLoader[/data/app/com.google.android.apps.iosched-1.apk]
07-11 02:23:37.266: E/AndroidRuntime(1881): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251)
07-11 02:23:37.266: E/AndroidRuntime(1881): at
java.lang.ClassLoader.loadClass(ClassLoader.java:548) 07-11
02:23:37.266: E/AndroidRuntime(1881): at
java.lang.ClassLoader.loadClass(ClassLoader.java:508) 07-11
02:23:37.266: E/AndroidRuntime(1881): at
android.app.ActivityThread.installProvider(ActivityThread.java:3850)
07-11 02:23:37.266: E/AndroidRuntime(1881): ... 12 more
I can see that there this class com.google.android.apps.iosched.provider.ScheduleProvider in the project. Can you help me fix this?
Judging by "I used EGit and there" you most probably used eclipse. I am afraid that the project is created in/for Android Studio and it will be very painful to try to setup it in eclipse - I wasted several hours trying with no luck... ...at the end I gived up and installed the Android Studio. There are more than 20 additional libraries that need to be added to the project in order to be able to run.
I have several free hours so I will give a try to the Android Studio but probably the google guys had to warn us on the project page that the project wont run in eclipse...
(of course there is a BUILDING.txt in the project root)
Related
I use this code to scale a bitmap in android, But doesn't work and App stops. I attached LOG CAT log
please say what's problem!?
screen=Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),screenID),gameSurface.width,gameSurface.height,false);
Log Cat::
07-11 19:13:19.878: E/AndroidRuntime(22770): FATAL EXCEPTION: main
07-11 19:13:19.878: E/AndroidRuntime(22770): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.game/com.example.game.GameScreen}: java.lang.IllegalArgumentException: width and height must be > 0
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.ActivityThread.access$600(ActivityThread.java:127)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.os.Handler.dispatchMessage(Handler.java:99)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.os.Looper.loop(Looper.java:137)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.ActivityThread.main(ActivityThread.java:4441)
07-11 19:13:19.878: E/AndroidRuntime(22770): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 19:13:19.878: E/AndroidRuntime(22770): at java.lang.reflect.Method.invoke(Method.java:511)
07-11 19:13:19.878: E/AndroidRuntime(22770): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-11 19:13:19.878: E/AndroidRuntime(22770): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-11 19:13:19.878: E/AndroidRuntime(22770): at dalvik.system.NativeStart.main(Native Method)
07-11 19:13:19.878: E/AndroidRuntime(22770): Caused by: java.lang.IllegalArgumentException: width and height must be > 0
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.graphics.Bitmap.createBitmap(Bitmap.java:603)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.graphics.Bitmap.createBitmap(Bitmap.java:551)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437)
07-11 19:13:19.878: E/AndroidRuntime(22770): at com.example.game.Map1.<init>(Map1.java:21)
07-11 19:13:19.878: E/AndroidRuntime(22770): at com.example.game.gameSurface.<init>(gameSurface.java:52)
07-11 19:13:19.878: E/AndroidRuntime(22770): at com.example.game.GameScreen.onCreate(GameScreen.java:37)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.Activity.performCreate(Activity.java:4465)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-11 19:13:19.878: E/AndroidRuntime(22770): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
07-11 19:13:19.878: E/AndroidRuntime(22770): ... 11 more
try using this in your onCreate
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
screenWidth = size.x;
screenHeight = size.y;
and then use those for your width and height.. my guess is that at the time you are calling the width and height those values are 0 because they are not done drawing or something
In your LOG CAT you can see :
Caused by: java.lang.IllegalArgumentException: width and height must be > 0
So you have probably set gameSurface.width or gameSurface.height to 0.
public static Bitmap createScaledBitmap (Bitmap src, int dstWidth, int dstHeight, boolean filter)
You are getting a IllegalArgumentException because your width is <= 0, or height is <= 0.
I want created my own camera application. And when I click the button it takes the picture and saves it in the galary. What I want to do is to take the picture without a preview and without clicking any button.
I am searching many but I did not get proper solution one code I founded.But when I run this it is Error.Please give me Exact Solution. You can give me your own project for automatically capture photo and save gallery automatic.
enter link MainActivity.java here
Error:
07-11 09:51:31.885: E/AndroidRuntime(2666): FATAL EXCEPTION: main
07-11 09:51:31.885: E/AndroidRuntime(2666): java.lang.RuntimeException: Unable to resume activity {com.example.capturephotoautometic_one/com.example.capturephotoautometic_one.SimpleCameraIntentFragment}: java.lang.RuntimeException: Fail to connect to camera service
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2742)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2771)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2235)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.ActivityThread.access$600(ActivityThread.java:141)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.os.Handler.dispatchMessage(Handler.java:99)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.os.Looper.loop(Looper.java:137)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.ActivityThread.main(ActivityThread.java:5041)
07-11 09:51:31.885: E/AndroidRuntime(2666): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 09:51:31.885: E/AndroidRuntime(2666): at java.lang.reflect.Method.invoke(Method.java:511)
07-11 09:51:31.885: E/AndroidRuntime(2666): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
07-11 09:51:31.885: E/AndroidRuntime(2666): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
07-11 09:51:31.885: E/AndroidRuntime(2666): at dalvik.system.NativeStart.main(Native Method)
07-11 09:51:31.885: E/AndroidRuntime(2666): Caused by: java.lang.RuntimeException: Fail to connect to camera service
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.hardware.Camera.native_setup(Native Method)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.hardware.Camera.<init>(Camera.java:340)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.hardware.Camera.open(Camera.java:317)
07-11 09:51:31.885: E/AndroidRuntime(2666): at com.example.capturephotoautometic_one.SimpleCameraIntentFragment.onResume(SimpleCameraIntentFragment.java:46)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1185)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.Activity.performResume(Activity.java:5182)
07-11 09:51:31.885: E/AndroidRuntime(2666): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2732)
07-11 09:51:31.885: E/AndroidRuntime(2666): ... 12 more
I am new to android and developing an application that uses the google maps API.
while running the application I have the error :
the application has stopped unexpectedly
Here's what I have in the logcat file :
07-11 01:38:25.751: E/AndroidRuntime(401): FATAL EXCEPTION: main
07-11 01:38:25.751: E/AndroidRuntime(401): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.training.surveyproject/com.training.surveyproject.SurveyActivity}: java.lang.ClassNotFoundException: com.training.surveyproject.SurveyActivity in loader dalvik.system.PathClassLoader[/data/app/com.training.surveyproject-2.apk]
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.os.Handler.dispatchMessage(Handler.java:99)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.os.Looper.loop(Looper.java:123)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.reflect.Method.invoke(Method.java:521)
07-11 01:38:25.751: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-11 01:38:25.751: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-11 01:38:25.751: E/AndroidRuntime(401): at dalvik.system.NativeStart.main(Native Method)
07-11 01:38:25.751: E/AndroidRuntime(401): Caused by: java.lang.ClassNotFoundException: com.training.surveyproject.SurveyActivity in loader dalvik.system.PathClassLoader[/data/app/com.training.surveyproject-2.apk]
07-11 01:38:25.751: E/AndroidRuntime(401): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
07-11 01:38:25.751: E/AndroidRuntime(401): ... 11 more
thank you
You must add the activity SurveyActivity to your AndroidManifest.xml file.
You may have also forgotten to add the Google Map Library to the manifest:
<application>
<uses-library android:name="com.google.android.maps" />
</application>
I have a library project I'm importing in other project. When I try to compile it, console says this (in red):
[2012-07-11 13:12:53 - Library] Could not find Library.apk!
This library contains some custom Views, and when I try to access one of them, it gives me this a Java.lang.RuntimeException caused by a android.view.InflateException which at the same time is caused by a java.lang.ClassNotFoundException on the View class on the Library.
Does anybody know how to solve this?
Here is the LogCat output just in case.
07-11 13:12:53.899: E/AndroidRuntime(16995): FATAL EXCEPTION: main
07-11 13:12:53.899: E/AndroidRuntime(16995): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cidaut.fragment.manager/com.cidaut.fragment.manager.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class com.cidaut.viewpagerlibrary.TabPageIndicator
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2079)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.ActivityThread.access$600(ActivityThread.java:132)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1157)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.os.Handler.dispatchMessage(Handler.java:99)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.os.Looper.loop(Looper.java:137)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.ActivityThread.main(ActivityThread.java:4575)
07-11 13:12:53.899: E/AndroidRuntime(16995): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 13:12:53.899: E/AndroidRuntime(16995): at java.lang.reflect.Method.invoke(Method.java:511)
07-11 13:12:53.899: E/AndroidRuntime(16995): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
07-11 13:12:53.899: E/AndroidRuntime(16995): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
07-11 13:12:53.899: E/AndroidRuntime(16995): at dalvik.system.NativeStart.main(Native Method)
07-11 13:12:53.899: E/AndroidRuntime(16995): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class com.cidaut.viewpagerlibrary.TabPageIndicator
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
07-11 13:12:53.899: E/AndroidRuntime(16995): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.Activity.setContentView(Activity.java:1835)
07-11 13:12:53.899: E/AndroidRuntime(16995): at com.cidaut.fragment.manager.MainActivity.onCreate(MainActivity.java:17)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.Activity.performCreate(Activity.java:4465)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
07-11 13:12:53.899: E/AndroidRuntime(16995): ... 11 more
07-11 13:12:53.899: E/AndroidRuntime(16995): Caused by: java.lang.ClassNotFoundException: com.cidaut.viewpagerlibrary.TabPageIndicator
07-11 13:12:53.899: E/AndroidRuntime(16995): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
07-11 13:12:53.899: E/AndroidRuntime(16995): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-11 13:12:53.899: E/AndroidRuntime(16995): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.view.LayoutInflater.createView(LayoutInflater.java:552)
07-11 13:12:53.899: E/AndroidRuntime(16995): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
07-11 13:12:53.899: E/AndroidRuntime(16995): ... 21 more
I had same problem ,now it's clear by the given action.
Please try Go to your project build path->order and export .Select you library files and press the buttons up,down. It will clear some confusion to get the library files .
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
See that /127.0.0.1:80? From the looks of things you're trying to connect to localhost, which in the device's context is itself.
The Android device probably isn't running a webserver, so it looks like you've misconfigured the ad service somehow.
Make sure you are performing your network connection on a network thread. This is often the cause of weird crashes like the one you are describing. You can read more about it here.
You should always perform potentially long-running/expensive operations on a separate thread!
on emulator you can connect to your computer with localhost but on real device you should use your computer's real ip address 192.168.1.xxx