Android 请求单位置更新,AVD崩溃

Android 请求单位置更新,AVD崩溃,android,geolocation,location,android-sdk-2.3,Android,Geolocation,Location,Android Sdk 2.3,我正在尝试使用新的LocationManager.requestSingleUpdate()方法请求单个位置更新,但一旦设备从GPS获得更新,操作系统就会崩溃,似乎要尝试重新启动。至少我得到了通常的Android启动屏幕,但它从未完成启动 我试着在2.3、2.3.1、2.3.3和2.2 AVD上运行代码,结果在所有AVD上都是一样的 *****更新***** public class LocationHelper { public static void getLocation(Con

我正在尝试使用新的LocationManager.requestSingleUpdate()方法请求单个位置更新,但一旦设备从GPS获得更新,操作系统就会崩溃,似乎要尝试重新启动。至少我得到了通常的Android启动屏幕,但它从未完成启动

我试着在2.3、2.3.1、2.3.3和2.2 AVD上运行代码,结果在所有AVD上都是一样的

*****更新*****

public class LocationHelper {

    public static void getLocation(Context context) {

        LocationListener locationListener = new LocationListener() {

            @Override
            public void onStatusChanged(String provider, int status, Bundle extras) {
                Log.v("LocationListener", "onStatusChanged");
            }    

            @Override
            public void onProviderEnabled(String provider) {
                Log.v("LocationListener", "onProviderEnabled");                
            }

            @Override
            public void onProviderDisabled(String provider) {
                Log.v("LocationListener", "onProviderDisabled");
            }

            @Override
            public void onLocationChanged(Location location) {
                Log.v("LocationListener", "onLocationChanged");
            }
        };

        LocationManager locationManager = (LocationManager)context.getSystemService(Service.LOCATION_SERVICE);

        Criteria criteria = new Criteria();
        criteria.setAccuracy(Criteria.ACCURACY_FINE);
        String provider = locationManager.getBestProvider(criteria, true);

        Log.v("Provider", provider);

        // FIXME: Something crashes the emulator when a GPS fix is sent through DDMS
        locationManager.requestSingleUpdate(provider, locationListener, Looper.myLooper());
    }
}
我尝试了一个我制作的旧的基于位置的应用程序,它在几百台设备上运行得很好,并且在发送位置更新时也会使AVD崩溃。我想这更像是理解AVD的位置更新出了什么问题,而不是在我的代码中发现错误

下面是我认为是错误的代码,以防可能与此相关:

*****结束更新*****

public class LocationHelper {

    public static void getLocation(Context context) {

        LocationListener locationListener = new LocationListener() {

            @Override
            public void onStatusChanged(String provider, int status, Bundle extras) {
                Log.v("LocationListener", "onStatusChanged");
            }    

            @Override
            public void onProviderEnabled(String provider) {
                Log.v("LocationListener", "onProviderEnabled");                
            }

            @Override
            public void onProviderDisabled(String provider) {
                Log.v("LocationListener", "onProviderDisabled");
            }

            @Override
            public void onLocationChanged(Location location) {
                Log.v("LocationListener", "onLocationChanged");
            }
        };

        LocationManager locationManager = (LocationManager)context.getSystemService(Service.LOCATION_SERVICE);

        Criteria criteria = new Criteria();
        criteria.setAccuracy(Criteria.ACCURACY_FINE);
        String provider = locationManager.getBestProvider(criteria, true);

        Log.v("Provider", provider);

        // FIXME: Something crashes the emulator when a GPS fix is sent through DDMS
        locationManager.requestSingleUpdate(provider, locationListener, Looper.myLooper());
    }
}
我还可能提到,根据日志,
provider
变量被设置为“gps”。LocationListener中的所有日志语句均未触发

下面是logcat的输出。第一行显示调用了my getLocation()函数。然后我通过DDMS提交一个gps定位,然后手机继续重新启动。我把原木剪短了一点,因为我要越过30k字符的边界,但我想第一行是最相关的

V/Provider(  430): gps

I/DEBUG   (   31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

I/DEBUG   (   31): Build fingerprint: 'generic/google_sdk/generic:2.3/GRH55/79397:eng/test-keys'

I/DEBUG   (   31): pid: 68, tid: 163  >>> system_server <<<

I/DEBUG   (   31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000

I/DEBUG   (   31):  r0 00000000  r1 40685948  r2 4128fcbc  r3 459e1c74

I/DEBUG   (   31):  r4 0000012d  r5 00000000  r6 40685948  r7 4128fcbc

I/DEBUG   (   31):  r8 84301321  r9 84302240  10 00100000  fp 00000001

I/DEBUG   (   31):  ip 82f0e7d4  sp 459e1c60  lr 82f0ab37  pc 82f07d0e  cpsr 00000030

I/DEBUG   (   31):          #00  pc 00007d0e  /system/lib/libandroid_servers.so

I/DEBUG   (   31):          #01  pc 0000ab32  /system/lib/libandroid_servers.so

I/DEBUG   (   31):          #02  pc 000012ca  /system/lib/hw/gps.goldfish.so

I/DEBUG   (   31):          #03  pc 000014ae  /system/lib/hw/gps.goldfish.so

I/DEBUG   (   31):          #04  pc 00011a7c  /system/lib/libc.so

I/DEBUG   (   31):          #05  pc 00011640  /system/lib/libc.so

I/DEBUG   (   31): 

I/DEBUG   (   31): code around pc:

I/DEBUG   (   31): 82f07cec ab04b082 9301cb04 6f646804 b00247a0 

I/DEBUG   (   31): 82f07cfc bc08bc10 4718b002 b510b40c ab04b082 

I/DEBUG   (   31): 82f07d0c 6804cb04 34f89301 47a06824 bc10b002 

I/DEBUG   (   31): 82f07d1c b002bc08 46c04718 b510b40c ab04b082 

I/DEBUG   (   31): 82f07d2c 9301cb04 34986804 47a06824 bc10b002 

I/DEBUG   (   31): 

I/DEBUG   (   31): code around lr:

I/DEBUG   (   31): 82f0ab14 91099008 f7fb6aa0 900aeb14 1c3a910b 

I/DEBUG   (   31): 82f0ab24 6b646b23 930c1c28 1c31940d f7fd9b0f 

I/DEBUG   (   31): 82f0ab34 4906f8e7 44791c28 f7ff3150 b011fe1d 

I/DEBUG   (   31): 82f0ab44 46c0bdf0 0000454c 000042c8 00000786 

I/DEBUG   (   31): 82f0ab54 f7fbb510 bd10ec7c 4802b510 f7fb4478 

I/DEBUG   (   31): 

I/DEBUG   (   31): stack:

I/DEBUG   (   31):     459e1c20  ac710cb3  

I/DEBUG   (   31):     459e1c24  40b38d0b  

I/DEBUG   (   31):     459e1c28  00000009  

I/DEBUG   (   31):     459e1c2c  00000000  

I/DEBUG   (   31):     459e1c30  0000ab90  [heap]

I/DEBUG   (   31):     459e1c34  81d48bd3  /system/lib/libdvm.so

I/DEBUG   (   31):     459e1c38  0000ab90  [heap]

I/DEBUG   (   31):     459e1c3c  459e1c6c  

I/DEBUG   (   31):     459e1c40  00010004  [heap]

I/DEBUG   (   31):     459e1c44  81d3761b  /system/lib/libdvm.so

I/DEBUG   (   31):     459e1c48  00000000  

I/DEBUG   (   31):     459e1c4c  afd0dcc4  /system/lib/libc.so

I/DEBUG   (   31):     459e1c50  00000000  

I/DEBUG   (   31):     459e1c54  459e1e00  

I/DEBUG   (   31):     459e1c58  df002777  

I/DEBUG   (   31):     459e1c5c  e3a070ad  

I/DEBUG   (   31): #00 459e1c60  00000001  

I/DEBUG   (   31):     459e1c64  8053bf25  /system/lib/libandroid_runtime.so

I/DEBUG   (   31):     459e1c68  0000012d  

I/DEBUG   (   31):     459e1c6c  82f0ab37  /system/lib/libandroid_servers.so

I/DEBUG   (   31):     459e1c70  4128fcbc  /dev/ashmem/dalvik-LinearAlloc (deleted)

I/DEBUG   (   31):     459e1c74  00000003  

I/DEBUG   (   31): #01 459e1c78  4284dfce  /system/usr/icu/icudt44l.dat

I/DEBUG   (   31):     459e1c7c  4042b604  /dev/ashmem/dalvik-heap (deleted)

I/DEBUG   (   31):     459e1c80  92023d3a  

I/DEBUG   (   31):     459e1c84  40490ac3  /dev/ashmem/dalvik-heap (deleted)

I/DEBUG   (   31):     459e1c88  00000000  

I/DEBUG   (   31):     459e1c8c  00000000  

I/DEBUG   (   31):     459e1c90  00000000  

I/DEBUG   (   31):     459e1c94  00000000  

I/DEBUG   (   31):     459e1c98  00000000  

I/DEBUG   (   31):     459e1c9c  00000000  

I/DEBUG   (   31):     459e1ca0  00000000  

I/DEBUG   (   31):     459e1ca4  00000000  

I/DEBUG   (   31):     459e1ca8  c4571f00  

I/DEBUG   (   31):     459e1cac  0000012d  

I/DEBUG   (   31):     459e1cb0  459e1e56  

I/DEBUG   (   31):     459e1cb4  00000003  

I/DEBUG   (   31):     459e1cb8  0000000a  

I/DEBUG   (   31):     459e1cbc  459e1de8  

I/DEBUG   (   31):     459e1cc0  00000000  

I/DEBUG   (   31):     459e1cc4  459e1e6b  

I/DEBUG   (   31):     459e1cc8  00000001  

I/DEBUG   (   31):     459e1ccc  843012cd  /system/lib/hw/gps.goldfish.so

I/StatusBarManagerService(   68): registerStatusBar bar=com.android.internal.statusbar.IStatusBar$Stub$Proxy@40692170

D/VoldCmdListener(   29): share status ums

D/StorageNotification(  278): Startup with UMS connection false (media state mounted)

I/StorageNotification(  278): UMS connection changed to false (media state mounted)

D/dalvikvm(  278): GC_CONCURRENT freed 501K, 55% free 2668K/5831K, external 897K/1038K, paused 9ms+6ms

I/ActivityManager(   68): Process com.android.defcontainer (pid 218) has died.

D/Zygote  (   33): Process 68 terminated by signal (11)

I/Zygote  (   33): Exit zygote because system server (68) has terminated

I/ActivityThread(  415): Removing dead content provider: settings

I/ServiceManager(   28): service 'batteryinfo' died

I/ServiceManager(   28): service 'usagestats' died

I/ServiceManager(   28): service 'SurfaceFlinger' died

I/ServiceManager(   28): service 'package' died

I/ServiceManager(   28): service 'sensorservice' died

I/ServiceManager(   28): service 'cpuinfo' died

I/ServiceManager(   28): service 'entropy' died

I/ServiceManager(   28): service 'power' died

I/ServiceManager(   28): service 'account' died

I/ServiceManager(   28): service 'telephony.registry' died

I/ServiceManager(   28): service 'appwidget' died

I/ServiceManager(   28): service 'backup' died

I/ServiceManager(   28): service 'permission' died

I/ServiceManager(   28): service 'activity' died

I/ServiceManager(   28): service 'meminfo' died

I/ServiceManager(   28): service 'diskstats' died

I/ServiceManager(   28): service 'content' died

I/ServiceManager(   28): service 'battery' died

I/ServiceManager(   28): service 'hardware' died

I/ServiceManager(   28): service 'vibrator' died

I/ServiceManager(   28): service 'alarm' died

I/ServiceManager(   28): service 'window' died

I/ServiceManager(   28): service 'device_policy' died

I/ActivityThread(  278): Removing dead content provider: settings

I/ActivityThread(  125): Removing dead content provider: settings

I/ActivityThread(  122): Removing dead content provider: settings

I/ActivityThread(  430): Removing dead content provider: settings

E/installd(   35): eof

E/installd(   35): failed to read size

I/installd(   35): closing connection

D/qemud   (   38): fdhandler_event: disconnect on fd 11

I/ServiceManager(   28): service 'statusbar' died

I/ServiceManager(   28): service 'clipboard' died

I/ServiceManager(   28): service 'network_management' died

I/ServiceManager(   28): service 'input_method' died

I/ServiceManager(   28): service 'netstat' died

I/ServiceManager(   28): service 'wifi' died

I/ServiceManager(   28): service 'connectivity' died

I/ServiceManager(   28): service 'throttle' died

I/ServiceManager(   28): service 'accessibility' died

I/ServiceManager(   28): service 'mount' died

I/ServiceManager(   28): service 'notification' died

I/ServiceManager(   28): service 'devicestoragemonitor' died

I/ServiceManager(   28): service 'location' died

I/ServiceManager(   28): service 'search' died

I/ServiceManager(   28): service 'dropbox' died

I/ServiceManager(   28): service 'wallpaper' died

I/ServiceManager(   28): service 'audio' died

I/ServiceManager(   28): service 'uimode' died

I/ServiceManager(   28): service 'isms' died

I/ServiceManager(   28): service 'simphonebook' died

I/ServiceManager(   28): service 'iphonesubinfo' died

I/ServiceManager(   28): service 'phone' died

I/ServiceManager(   28): service 'media.audio_flinger' died

I/ServiceManager(   28): service 'media.audio_policy' died

I/ServiceManager(   28): service 'media.player' died

I/ServiceManager(   28): service 'media.camera' died

I/Netd    (  445): Netd 1.0 starting

D/AndroidRuntime(  446): 

D/AndroidRuntime(  446): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<

D/AndroidRuntime(  446): CheckJNI is ON

I/        (  444): ServiceManager: 0xad50

D/AudioHardwareInterface(  444): setMode(NORMAL)

I/CameraService(  444): CameraService started (pid=444)

I/AudioFlinger(  444): AudioFlinger's thread 0xc650 ready to run

I/SamplingProfilerIntegration(  446): Profiler is disabled.

I/Zygote  (  446): Preloading classes...

D/dalvikvm(  446): GC_EXPLICIT freed 47K, 78% free 232K/1024K, external 0K/0K, paused 33ms

D/dalvikvm(  446): GC_EXPLICIT freed 1K, 73% free 282K/1024K, external 0K/0K, paused 17ms

D/dalvikvm(  446): GC_EXPLICIT freed 22K, 70% free 316K/1024K, external 0K/0K, paused 19ms

D/dalvikvm(  446): GC_EXPLICIT freed 17K, 66% free 353K/1024K, external 0K/0K, paused 8ms

D/dalvikvm(  446): GC_EXPLICIT freed 26K, 63% free 382K/1024K, external 0K/0K, paused 19ms

D/dalvikvm(  446): GC_EXPLICIT freed 20K, 58% free 439K/1024K, external 0K/0K, paused 20ms

W/MediaProfiles(  446): could not find media config xml file

D/dalvikvm(  446): GC_EXPLICIT freed 99K, 47% free 545K/1024K, external 0K/0K, paused 24ms

D/dalvikvm(  446): GC_EXPLICIT freed 272K, 28% free 884K/1219K, external 0K/0K, paused 45ms

D/dalvikvm(  446): GC_EXPLICIT freed 21K, 24% free 931K/1219K, external 0K/0K, paused 41ms

D/RenderScript_jni(  446): RenderScript JNI library not found!

D/dalvikvm(  446): GC_EXPLICIT freed 25K, 19% free 998K/1219K, external 0K/0K, paused 51ms

D/dalvikvm(  446): GC_EXPLICIT freed 47K, 5% free 1281K/1347K, external 0K/0K, paused 64ms

D/dalvikvm(  446): GC_EXPLICIT freed 24K, 3% free 1310K/1347K, external 0K/0K, paused 72ms

D/dalvikvm(  446): GC_EXPLICIT freed 28K, 6% free 1336K/1411K, external 0K/0K, paused 63ms

D/dalvikvm(  446): GC_EXPLICIT freed 14K, 3% free 1376K/1411K, external 0K/0K, paused 75ms

D/dalvikvm(  446): GC_EXPLICIT freed 28K, 5% free 1402K/1475K, external 0K/0K, paused 64ms

D/dalvikvm(  446): GC_EXPLICIT freed 28K, 3% free 1439K/1475K, external 0K/0K, paused 78ms

D/dalvikvm(  446): GC_EXPLICIT freed 38K, 6% free 1456K/1539K, external 0K/0K, paused 77ms

D/dalvikvm(  446): GC_EXPLICIT freed 40K, 5% free 1471K/1539K, external 0K/0K, paused 76ms

D/dalvikvm(  446): GC_EXPLICIT freed 55K, 8% free 1485K/1603K, external 0K/0K, paused 75ms

D/dalvikvm(  446): GC_FOR_MALLOC freed 2956K, 58% free 2166K/5123K, external 0K/0K, paused 273ms

D/dalvikvm(  446): GC_EXPLICIT freed 1401K, 55% free 2309K/5123K, external 0K/0K, paused 162ms

D/dalvikvm(  446): GC_EXPLICIT freed 141K, 55% free 2355K/5123K, external 0K/0K, paused 146ms

D/dalvikvm(  446): GC_EXPLICIT freed 73K, 54% free 2380K/5123K, external 0K/0K, paused 162ms

D/dalvikvm(  446): GC_EXPLICIT freed 36K, 54% free 2398K/5123K, external 0K/0K, paused 139ms

D/dalvikvm(  446): GC_EXPLICIT freed 30K, 53% free 2421K/5123K, external 0K/0K, paused 140ms

D/dalvikvm(  446): GC_EXPLICIT freed 38K, 53% free 2444K/5123K, external 0K/0K, paused 141ms

I/Zygote  (  446): ...preloaded 1830 classes in 23652ms.

E/Zygote  (  446): setreuid() failed. errno: 17

D/dalvikvm(  446): GC_EXPLICIT freed 18K, 53% free 2442K/5123K, external 0K/0K, paused 153ms

I/Zygote  (  446): Preloading resources...

D/dalvikvm(  446): GC_EXTERNAL_ALLOC freed <1K, 53% free 2444K/5123K, external 0K/0K, paused 141ms

W/Zygote  (  446): Preloaded drawable resource #0x1080093 (res/drawable-mdpi/sym_def_app_icon.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080002 (res/drawable-mdpi/arrow_down_float.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10800b4 (res/drawable/btn_check.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10800b7 (res/drawable-mdpi/btn_check_label_background.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10800b8 (res/drawable-mdpi/btn_check_off.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10800bd (res/drawable-mdpi/btn_check_on.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080004 (res/drawable/btn_default.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080005 (res/drawable/btn_default_small.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080006 (res/drawable/btn_dropdown.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080008 (res/drawable/btn_plus.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080007 (res/drawable/btn_minus.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080009 (res/drawable/btn_radio.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x108000a (res/drawable/btn_star.xml) that varies with configuration!!

D/dalvikvm(  446): GC_EXPLICIT freed 25K, 52% free 2481K/5123K, external 408K/521K, paused 128ms

W/Zygote  (  446): Preloaded drawable resource #0x1080132 (res/drawable/btn_toggle.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080196 (res/drawable-mdpi/ic_emergency.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080012 (res/drawable-mdpi/divider_horizontal_bright.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080014 (res/drawable-mdpi/divider_horizontal_dark.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080016 (res/drawable/edit_text.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080170 (res/drawable/expander_group.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080062 (res/drawable/list_selector_background.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x108022a (res/drawable-mdpi/menu_background.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x108022b (res/drawable-mdpi/menu_background_fill_parent_width.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x108022c (res/drawable/menu_selector.xml) that varies with configuration!!

D/dalvikvm(  446): GC_EXTERNAL_ALLOC freed 16K, 52% free 2494K/5123K, external 516K/521K, paused 135ms

W/Zygote  (  446): Preloaded drawable resource #0x108023a (res/drawable-mdpi/panel_background.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080242 (res/drawable-mdpi/popup_bottom_bright.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080243 (res/drawable-mdpi/popup_bottom_dark.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080244 (res/drawable-mdpi/popup_bottom_medium.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080245 (res/drawable-mdpi/popup_center_bright.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080246 (res/drawable-mdpi/popup_center_dark.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080249 (res/drawable-mdpi/popup_full_dark.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x108024c (res/drawable-mdpi/popup_top_bright.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x108024d (res/drawable-mdpi/popup_top_dark.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x108006d (res/drawable/progress_indeterminate_horizontal.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080253 (res/drawable/progress_small.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080254 (res/drawable/progress_small_titlebar.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080274 (res/drawable-mdpi/scrollbar_handle_horizontal.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080275 (res/drawable-mdpi/scrollbar_handle_vertical.9.png) that varies with configuration!!

D/dalvikvm(  446): GC_EXPLICIT freed 15K, 52% free 2506K/5123K, external 585K/1038K, paused 142ms

W/Zygote  (  446): Preloaded drawable resource #0x1080071 (res/drawable/spinner_dropdown_background.xml) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080304 (res/drawable-mdpi/text_select_handle_left.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080305 (res/drawable-mdpi/text_select_handle_middle.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080306 (res/drawable-mdpi/text_select_handle_right.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x1080327 (res/drawable-mdpi/title_bar_shadow.9.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10801d8 (res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10801d9 (res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10801da (res/drawable-mdpi/indicator_code_lock_point_area_default.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10801db (res/drawable-mdpi/indicator_code_lock_point_area_green.png) that varies with configuration!!

W/Zygote  (  446): Preloaded drawable resource #0x10801dc (res/drawable-mdpi/indicator_code_lock_point_area_red.png) that varies with configuration!!

I/Zygote  (  446): ...preloaded 51 resources in 2898ms.

I/Zygote  (  446): ...preloaded 15 resources in 64ms.

D/dalvikvm(  446): GC_EXPLICIT freed 23K, 51% free 2514K/5123K, external 716K/1038K, paused 134ms

D/dalvikvm(  446): GC_EXPLICIT freed 6K, 52% free 2508K/5123K, external 716K/1038K, paused 128ms

D/dalvikvm(  446): GC_EXPLICIT freed <1K, 52% free 2508K/5123K, external 716K/1038K, paused 224ms

I/dalvikvm(  446): System server process 453 has been created

I/Zygote  (  446): Accepting command socket connections

E/BatteryService(  453): usbOnlinePath not found

E/BatteryService(  453): batteryVoltagePath not found

E/BatteryService(  453): batteryTemperaturePath not found

I/sysproc (  453): Entered system_init()

I/sysproc (  453): ServiceManager: 0x8fbe8

I/SurfaceFlinger(  453): SurfaceFlinger is starting

I/SurfaceFlinger(  453): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...

E/SurfaceFlinger(  453): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake

I/gralloc (  453): using (fd=27)

I/gralloc (  453): id           = 

I/gralloc (  453): xres         = 320 px

I/gralloc (  453): yres         = 480 px

I/gralloc (  453): xres_virtual = 320 px

I/gralloc (  453): yres_virtual = 960 px

I/gralloc (  453): bpp          = 16

I/gralloc (  453): r            = 11:5

I/gralloc (  453): g            =  5:6

I/gralloc (  453): b            =  0:5

I/gralloc (  453): width        = 49 mm (165.877548 dpi)

I/gralloc (  453): height       = 74 mm (164.756760 dpi)

I/gralloc (  453): refresh rate = 60.00 Hz

D/libEGL  (  453): egl.cfg not found, using default config

D/libEGL  (  453): loaded /system/lib/egl/libGLES_android.so

I/SurfaceFlinger(  453): EGL informations:

I/SurfaceFlinger(  453): # of configs : 8

I/SurfaceFlinger(  453): vendor    : Android

I/SurfaceFlinger(  453): version   : 1.4 Android META-EGL

I/SurfaceFlinger(  453): extensions: EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_ANDROID_image_native_buffer EGL_ANDROID_swap_rectangle 

I/SurfaceFlinger(  453): Client API: OpenGL ES

I/SurfaceFlinger(  453): EGLSurface: 5-6-5-0, config=0x0

I/SurfaceFlinger(  453): OpenGL informations:

I/SurfaceFlinger(  453): vendor    : Android

I/SurfaceFlinger(  453): renderer  : Android PixelFlinger 1.4

I/SurfaceFlinger(  453): version   : OpenGL ES-CM 1.0

I/SurfaceFlinger(  453): extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_OES_EGL_image GL_OES_compressed_ETC1_RGB8_texture GL_ARB_texture_compression GL_ARB_texture_non_power_of_two GL_ANDROID_user_clip_plane GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap 

I/SurfaceFlinger(  453): GL_MAX_TEXTURE_SIZE = 4096

I/SurfaceFlinger(  453): GL_MAX_VIEWPORT_DIMS = 4096

I/SurfaceFlinger(  453): flags = 000c0000

D/SensorService(  453): nuSensorService starting...

E/SensorService(  453): couldn't open device for module sensors (Invalid argument)

I/sysproc (  453): System server: starting Android runtime.

I/sysproc (  453): System server: starting Android services.
<代码>V/提供商(430):gps I/DEBUG(31):*************************************************** I/DEBUG(31):构建指纹:“generic/google_sdk/generic:2.3/GRH55/79397:eng/testkeys”
I/DEBUG(31):pid:68,tid:163>>>系统服务器>>>>AndroidRuntime启动com.android.internal.os.ZygoteInit存在导致此问题的原因。目前没有修复程序。

请从DDMS附加stacktrace。另外,既然您之前正在创建和设置一个条件,而且从未使用过,为什么要将
newcriteria()
传递给
getBestProvider
?另外,请检查您是否已在清单中设置了所需的权限对不起,我猜详细信息有点缺乏。我修复了
newcriteria()
错误,并重新运行代码以确保它仍然失败。我还添加了logcat输出(如果说来自ddms的stacktrace,你指的是其他东西,我不熟悉),以及我清单中的
项。嗯,你有没有尝试过一些Android API演示或其他小而基本的演示(使用Location),如果它在你的AVD上运行良好的话?对不起,我似乎在这方面失手了。我找不到API演示,但现在我尝试了我编写的另一个基于位置的应用程序,该应用程序在几百部手机上运行良好,它确实也会使AVD崩溃。我还将SDK平台升级到了版本2.3.3,但它给出了相同的结果。尝试调试非常慢,因为每次尝试都必须重新启动AVD。:)更新了问题和标题以反映新信息。