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

2024-04-21

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

我尝试在 2.3、2.3.1、2.3.3 和 2.2 AVD 上运行代码,结果都相同。

***** Update *****

我尝试了我制作的一个旧的基于位置的应用程序,它在几百台设备上运行得很好,并且在向 AVD 发送位置更新时也会导致 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 的输出。第一行显示调用了我的 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.

我在清单中请求以下权限:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

2.3 模拟器中的一个错误 http://code.google.com/p/android/issues/detail?id=13015这会导致这个问题。目前尚无修复方法。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

请求单个位置更新,AVD 崩溃 的相关文章

  • Android USB_DEVICE_ATTACHED 持久权限

    如何让 Android 在每次重新连接 USB 设备时都不再请求权限 我想让它记住 USB 设备的 默认使用 复选标记 这样我就不必每次都向同一设备授予权限 我以编程方式检测 USB 设备 Android 手机 何时连接到我的主机设备 An
  • Android 在连接 Socket 时出现错误

    在阅读了一些express io文档并成功连接到之后 我尝试使用nodejs和express io编写简单的应用程序http chat socket io在命令行中运行下面的代码并打开后 我找到了使用 nodejs 和express io
  • 如何在 ubuntu 14.04 中保持 Android 模拟器始终位于最前面

    如何在 ubuntu 14 04 中保持 Android 模拟器始终位于最前面 我使用的是 Android Studio 2 1 1 和模拟器版本 25 1 6 在将 Android SDK Tools 更新到 25 1 6 之前它可以正常
  • 何时使用支持库

    我对 Android 支持库的用途和何时需要它感到困惑 据我了解 使用支持库的主要优点是 Android 可以在旧版本中自行实现主题和 UI 功能 而无需开发人员显式定义它们 这些关键的 UI 功能之一是操作栏 它是为 Honeycomb
  • 为什么 LocationSettingsResult startResolutionForResult 不调用 onActivityResult?

    我看过这个问答LocationSettingsRequest 对话框 跳过 onActivityResult https stackoverflow com questions 31235564 locationsettingsreques
  • Glide:如何使用 Glide v4 调整 gif 大小并将其另存为文件?

    我想调整 gif 文件的大小并保存它 我尝试使用一些建议的方法 但这些方法给出了错误 后来我知道有些方法在 Glide 中已被弃用v4 byte bytes Glide with context asGif load url toBytes
  • OnSharedPreferenceChangeListener 未调用 #2

    好吧 我开始从 Google 的 android 实现这个可怕的代码 未调用 OnSharedPreferenceChangeListener 这是我的代码 你能建议一下吗 类定义 private SharedPreferences sPr
  • DrawerLayout 第一次打开有点步骤

    我有一个 DrawerLayout 当我第一次滑动它时 它是逐步出现的 比如滞后或类似的东西 但之后它移动得很好 我不知道要发布什么代码 因为正如我所说 它工作正常 只是第一次打开它时 它打开不顺利 这是我的布局
  • 如何转到材料日历视图中选定的日期?

    我在用着材料日历视图 https github com prolificinteractive material calendarview在我的项目中 我可以使用 setSelectedDate 方法更改日期的选择 我有一个 今天选择 按钮
  • 更改单击后退按钮上的 BottomNavigationView 图标

    在我的布局的底部有一个底部导航视图与三个片段 如果我单击后退按钮 片段将切换 但底部图标不会切换 我该如何修复它 addToBackStack 有效 也许您有一些关于美化代码的建议 在活动或片段中添加片段标签是一个好的做法吗 public
  • 如何允许另一个应用程序访问我的应用程序的数据目录?

    假设我有一个名为 A 的应用程序 其数据目录为 com example test 现在我想制作另一个名为 B 的应用程序来修改 com example test 中的某些内容 当然我知道两者必须共享相同的签名 但我还需要什么 基本上我正在尝
  • Android NDK __android_log_print函数和LogCat

    我有一个类似的功能 android log print ANDROID LOG INFO HelloNDK 在我的 C 代码上 我在 LogCat 上找不到该输出 我需要设置什么样的过滤器 按日志标签 按日志消息 按应用程序名称 按日志级别
  • 如何检查Android应用程序是否第一次打开

    我想在用户第一次打开应用程序时有一个弹出窗口 如何查看 获取应用程序被打开的次数 请帮忙 多谢 当您的应用程序启动时 在onCreate 方法 您可以检查 SharedPreference 是否存在 如果没有 则这是该应用程序第一次启动 然
  • android应用程序在模拟器上运行但在手机上运行

    我有我开发的这个应用程序 它在模拟器上运行得很好 没有任何错误 但当我尝试在手机上运行相同的代码进行测试时 应用程序崩溃并提示 filenotfoundexception 它说文件 res drawable divider horizo n
  • Android - 使用 HttpURLConnection 来 POST XML 数据

    我遇到了一些死胡同 需要一些帮助 请 我对 Android 开发 以及一般编码 非常陌生 基本上我需要使用 HttpURLConnection 将 XML 数据发布到 URL 但无法让它工作 我的应用程序从 GET 请求读取并传递 XML
  • 蓝牙连接;无法正确发送字符串

    当我需要将字符串从服务器蓝牙套接字发送到客户端蓝牙套接字时 我的程序遇到了麻烦 只要我一次只发送一个字符串 例如聊天 一切都可以正常工作 但是如果我需要在短时间内编写更多字符串 以交换信息 则字符串将不会与客户端代码分离 例如 如果我发送
  • 如何在 Android 中隐藏列表视图中的项目

    我知道 这个问题以前曾被问过 但我还没有看到有效的答案 有什么办法可以隐藏一些项目ListView不改变源数据 我尝试将项目视图的可见性设置为消失 它不会再显示 但为此项目保留的位置仍然存在 我还设置了 android dividerHei
  • 在 SDK 中找不到文件夹“tools”

    我在做安卓开发使用 Eclipse 我已经下载了所有必需的软件 但遇到了与中讨论的相同的问题 无法在 Eclipse 中设置 Android Target https stackoverflow com questions 6384328
  • 始终启动没有历史记录的新活动实例

    有没有办法将活动作为没有历史记录的新实例启动 在清单文件中尝试了以下内容 android launchmode singleinstance android noHistory true 我能够实现我所需要的 但是一旦屏幕锁定 就会显示之前
  • Pinterest 喜欢自定义 GridView

    我是 Android 新手 我正在寻找网格视图的逻辑 例如为 iPhone 构建的 pinterest homescreen 应用程序 一个大号 图像来自服务器 我需要以以下形式显示并具有分页效果 即在滚动上加载图像 如果可以的话请回复 我

随机推荐

  • Rails:如何为 ruby​​ 模块编写测试?

    我想知道如何为混合到几个类中的模块编写单元测试 但不太知道如何去做 我是否通过在包含它们的类的测试文件之一中编写测试来测试实例方法 似乎不正确 或者您可以以某种方式将所包含方法的测试保留在特定于模块的单独文件中吗 同样的问题也适用于类方法
  • VBO - 没有指数化的指数化

    我正在尝试将 VBO 与元素数组缓冲区一起用于我的三角形 如下所示 glBindBuffer GL ARRAY BUFFER g Buffer 0 glVertexPointer 3 GL FLOAT 0 BUFFER OFFSET 0 g
  • 如何使用 python-decorator 包来装饰类方法?

    我有一个装饰器 我想用它来装饰类方法 在下面的示例中 mydec 装饰器本身可以正常工作 但是在使用 help 或 pydoc 时它不会保留函数签名 为了解决这个问题 我研究了使用 decorator python decorator 包
  • GZipStream:为什么我们在压缩后转换为base 64?

    我只是在查看用于压缩字符串的代码示例 我发现使用 GZipStream 类就足够了 但我不明白为什么我们必须将其转换为 Base 64 字符串 如示例所示 using System IO Compression using System T
  • 无法在 Java 中使用 List 类进行向下转换 [重复]

    这个问题在这里已经有答案了 我一直在寻找这个问题的答案 但没有成功 我的问题是为什么不能使用泛型进行向下转型 我有一个名为 Job 的类 并扩展了一个名为 Model 的类 Job extends Model 现在 我从生成模型列表的可重用
  • 手动生成 .appxsym 和 .appxupload 用于 Windows 应用商店应用程序崩溃分析是否安全?

    我们有一个带有手动打包过程的应用程序 MakeAppx exe 我们希望将此应用程序发布到商店 包括公共符号文件 以便我可以下载 cab 进程转储文件进行崩溃分析 如这里描述的 http msdn microsoft com en us l
  • Bower:安装 2 个版本的 jQuery

    我将如何安装 2 个版本的 jQuery使用凉亭 我想要 v2 0 以及 1 9 1 来支持浏览器回退 我遇到的问题是如果你跑bower install jquery 1 9 1 jquery 2 0 0第一个版本被第二个版本覆盖 因为它们
  • 在 UIImage imageNamed 中使用外部图像

    我正在从网上下载两张图片 Apple png 和 电子邮件受保护 cdn cgi l email protection 我想用 UIImage imageNamed Apple png 因此它可以使用内置功能来检测是否应该显示 Apple
  • 使用 oAuth 或其他方式实施访问

    我正在尝试想办法向其他第三方网站开放网站及其部分数据库 类似于 Twitter 让网络应用程序连接到其数据库以检索数据并可能存储数据的方式 我最初的研究让我想到了 oAuth 或者是 openID 我需要做的是让第三方网站登录网站上的用户帐
  • 在 MATLAB 中将数组拆分为多个部分

    我想将数组分成相等的部分 如下所示 a 1 2 3 4 5 6 7 8 9 10 n 2 b split a n b 1 2 3 4 5 6 7 8 9 10 哪个函数可以做到这一点 尝试这个 a 1 2 3 4 5 6 reshape a
  • 想要为 Android Activity 提供半透明背景?

    我希望某个活动有一个半透明的背景 以便可以在该活动下方看到之前的活动 类似于在后台播放的视频上方弹出的半透明菜单 这可能吗 你能告诉我怎么做吗 注意 我无法使用 Android 的默认半透明主题 因为我正在为我的应用程序使用我自己的自定义背
  • 指向数组元素

    我想要实现的目标是说我有一个数组 我希望能够通过指向它来修改整个代码中的特定数组元素 例如在 C 中我可以这样做 int main int arr 5 1 2 3 4 5 int c arr 3 cout lt lt arr 3 lt
  • Xcode 12 和 OSLog (os.log):包装 OSLogMessage 导致编译错误:参数必须是字符串插值

    在 Xcode 12 iOS 14 中 OSLog 获得了对字符串插值的支持 耶 但仍然无法附加挂钩以轻松登录到其他渠道 例如 Crashlytics 所以我想我只需制作一个简单的包装器并传递参数即可 然而 关于字符串插值似乎发生了一些神奇
  • “无法开始调试”-VS2010 ASP.NET MVC 2

    我只能使用 VS2010 和 ASP NET MVC2 启动一次调试会话 当我结束第一个会话并尝试启动另一个会话时 我可以看到 无法开始调试 没有其他消息 我使用 Visual Studio Development Server 而不是 I
  • 删除单链表中的节点

    如何删除只有一个指针指向要删除节点的单链表中的节点 起始和结束指针未知 可用信息是指向应删除节点的指针 您可以在不获取前一个节点的情况下删除节点 方法是让它模仿以下节点并删除该节点 void delete Node n if is sent
  • SMLoginItemSetEnabled - 从应用程序沙盒登录开始 - Xcode 6.3(插图)

    当应用程序沙箱化时 如何使应用程序具有登录时启动功能 感谢 CORY BOHON 他创建了以下教程 http martiancraft com blog 2015 01 login items http martiancraft com b
  • 在 Pandas Lambda 函数中使用带有多个 if 语句的 Apply

    我试图根据数据框中人的大小来推断分类 如下所示 Size 1 80000 2 8000000 3 8000000000 我希望它看起来像这样 Size Classification 1 80000 lt 1m 2 8000000 1 10m
  • 我们可以在 OpenAPI/Swagger 2.0 中设置全局“消费”和“生产”吗?

    在我需要设置的每个路径中consumes and produces 我可以全局设置它们吗 post summary description consumes application json application xml produces
  • 将字典存储在 pandas 数据框中

    我想将字典存储到数据框中 dictionary example 1234 choice 0 choice set 0 A 100 B 200 C 300 1 A 200 B 300 C 300 2 A 500 B 300 C 300 234
  • 请求单个位置更新,AVD 崩溃

    我尝试使用新的 LocationManager requestSingleUpdate 方法请求单个位置更新 但是一旦设备从 GPS 获取更新 操作系统就会崩溃 并且似乎会尝试重新启动 至少我看到了通常的 Android 启动屏幕 但它永远