Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个例外
java.lang.RuntimeException: Unable to start service ... java.lang.SecurityException: Requires ACCESS_MOCK_LOCATION secure setting
但是我有Manifest文件:
Manifest
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
有什么问题?
权限需要在<application>元素之外。
<application>
此外,您需要从设置 -> 应用程序 -> 开发中启用模拟位置(Nexus S,可能在其他设备上有所不同)。
参考