百度地图导航初始化失败 5C

11-24 19:33:53.671 14962-14962/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
11-24 19:33:53.683 14962-14968/? I/art: Debugger is no longer active
11-24 19:33:53.852 14962-14979/? I/Adreno-EGL: : EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.013_msm8974_refs/tags/AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.013__release_AU (I48a9d37399)
OpenGL ES Shader Compiler Version: E031.29.00.00
Build Date: 11/17/16 Thu
Local Branch:
Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.013
Local Patches: NONE
Reconstruct Branch: NOTHING
11-24 19:33:53.854 14962-14979/? I/OpenGLRenderer: Initialized EGL, version 1.4
11-24 19:33:53.890 14962-14980/? W/DeviceId: galaxy lib host missing meta-data,make sure you know the right way to integrate galaxy
11-24 19:33:53.890 14962-14980/? W/DeviceId: galaxy lib host missing meta-data,make sure you know the right way to integrate galaxy
11-24 19:33:53.890 14962-14980/? W/DeviceId: galaxy lib host missing meta-data,make sure you know the right way to integrate galaxy
11-24 19:33:53.901 14962-14980/? I/BaiduApiAuth: BaiduApiAuth SDK Version:1.0.20

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<!-- 这个权限用于访问GPS定位-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<!-- 获取运营商信息,用于支持提供运营商信息相关的接口-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<!-- 这个权限用于获取wifi的获取权限,wifi信息会用来进行网络定位-->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<!-- 用于读取手机当前的状态-->
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<!-- 写入扩展存储,向扩展卡写入数据,用于写入离线定位数据-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<!-- 访问网络,网络定位需要上网-->
<uses-permission android:name="android.permission.INTERNET" />
<!-- SD卡读取权限,用户写入离线定位数据-->
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"></uses-permission>

<uses-permission android:name="android.permissioin.WRITE_SETTINGS" />



<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <!--在application标签下进行设置-->
    <meta-data
        android:name="com.baidu.lbsapi.API_KEY"
        android:value="0*******W" />
    <!--//key:开发者申请的key-->

    <service android:name="com.baidu.location.f"
        android:enabled="true" android:process=":remote">
        <intent-filter>
            <action android:name="com.baidu.location.service_v2.4"></action>
        </intent-filter>
    </service>


            请问我这哪里出错了?定位一直失败!

4个回答

你手机是6.0或者6.0之后的系统吧

可能是没有获限到硬件信息

已经解决了,是Android系统的问题,要动态获取权限

Plantago
Plantago 回复4⃣ x 9⃣ 4⃣ 9⃣: 搜索Android6.0动态获取权限
6 个月之前 回复
C_vivian
4⃣ x 9⃣ 4⃣ 9⃣ 请问怎样动态获取权限呢?
6 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!