java - Android Error testing app using Mock Location -
i'm trying test android location based app.
it useful if mock location data providers in unit tests. can't add access_mock_location
permission androidmanifest.xml
because when gives me error:
mock locations should only be requested in a debug-specific manifest file (typically src/debug/androidmanifest.xml) using mock location provider (by requiring permission android.permission.access_mock_location) should done in debug builds. in gradle projects, means should request permission in debug source set specific manifest file. fix this, create new manifest file in debug folder , move element there. typical path debug manifest override file in gradle project src/debug/androidmanifest.xml.
but when add androidmanifest.xml
src/androidtest
directory - ignores when testing.
what doing wrong?
i had problem , think figured out solution. make sure "access mock locations" checked in device developer options (in addition making "src/debug/androidmanifest.xml" file declaring usage of access_mock_location permission, doing).
Comments
Post a Comment