Android - Unable to get the gps location on the emulator

后端 未结 4 1122
不知归路
不知归路 2020-12-06 18:12

i\'m tring to use the gps on the android emulator, i\'ve the following code:

public class NL extends Activity {

 private LocationManager locmgr = null;

 @O         


        
4条回答
  •  庸人自扰
    2020-12-06 18:45

    Are you sure that your emulated device is actually supporting GPS? I think there was an extra option for this...

    This may help too:

    Thanks! To all: You can change the Build Target for your project any time in Eclipse: Right-click the project in Package Explorer, select Properties > Android and then check 'Google API' for Project Target. -- Developers working with non-English culture settings might notice that pressing the Send button in Location Controls does not send a new location to the Android emulator. It's fixed with the upcoming release 7 of the SDK tools; for a quick fix you can change your locale to 'en'. (See code.google.com/p/android/issues/detail?id=915 for details.) – Patrick de Kleijn

    source: GPS on emulator doesn't get the geo fix - Android

提交回复
热议问题