AndroidManifest.xml
<service
android:name="com.baidu.location.f"
android:enabled="true"
android:permission="android.permission.BAIDU_LOCATION_SERVICE"
android:process=":remote" >
<intent-filter>
<action android:name="com.baidu.location.service" >
</action>
</intent-filter>
</service>
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="申请的key值" />
在适配低版本手机时,需要声明权限
<permission android:name="android.permission.BAIDU_LOCATION_SERVICE" />
<uses-permission android:name="android.permission.BAIDU_LOCATION_SERVICE" />