官網下載下來的examples中的代碼用到的庫是examples中的,不是我本身從官網統一打包下載下來的jar和so,因此當我寫程序的時候,必定要用我本身下載下來的BaiduLBS_AndroidSDK_Lib目錄下的libs子目錄中的jar及libs目錄下的armeabi子目錄中的全部so導到項目中。jar文件放到項目下的app目錄下的libs子目錄(若是沒有這個子目錄要手動建立),下載下來的庫中的libs\armeabi\下的全部so文件放到app\src\main\jniLibs\armeabi目錄中,此處jniLibs目錄若是沒有要手動建立。android
在AndroidManifest.xml中的Application標籤下增長 <service android:name="com.baidu.location.f" android:enabled="true" android:process=":remote" > <intent-filter> <action android:name="com.baidu.location.service_v2.2" > </action> </intent-filter> </service> 其它常規的KEY部分那就不用說了。 這樣配置以後,當啓動定位LocationClient.start以後就會不間斷收到定位通知。app