Error: Mock locations should only be requested in a test or debug-specific manifest file (typically

Error: Mock locations should only be requested in a test or debug-specific manifest file (typically src/debug/AndroidManifest.xml) [MockLocation]

解决办法:

在AndroidManifest文件标签添加tools:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"

然后在该权限的位置添加tools:

<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"
    tools:ignore="MockLocation"/>

猜你喜欢

转载自blog.csdn.net/taowuhua0505/article/details/80176666