Closed DerekBeam closed 1 year ago
I also tried adding in the sharedUserId
to the manifest per the README instructions, but then I get the error below. I'm not sure if that is related or not.
> Task :app:connectedDebugAndroidTest FAILED
Exception thrown during onBeforeAll invocation of plugin com.google.testing.platform.plugin.android.AndroidDevicePlugin.
Failed to install APK(s): app\build\outputs\apk\androidTest\debug\app-debug-androidTest.apk
INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Package <my-package> tried to change user null
com.android.ddmlib.InstallException: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Package <my-package> tried to change user null
at com.android.ddmlib.internal.DeviceImpl.installRemotePackage(DeviceImpl.java:1315)
at com.android.ddmlib.internal.DeviceImpl.installPackage(DeviceImpl.java:1141)
at com.android.tools.utp.plugins.deviceprovider.ddmlib.DdmlibAndroidDevice.installPackage(DdmlibAndroidDevice.kt)
at com.android.tools.utp.plugins.deviceprovider.ddmlib.DdmlibAndroidDeviceController$executeAsync$deferred$1.invokeSuspend(DdmlibAndroidDeviceController.kt:173)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
I was able to fix this by adding the AndroidManfiest to the debug folder instead
Expected behaviour
I expect to not have to include undesired permissions in order for Shot to record screenshots.
Actual behaviour
I'm using Showkase to automatically create my snapshot tests with Shot on Windows. This is working as intended. A sample setup is located here: https://github.com/davidvavra/showkase-screenshot-tests/tree/shot
When I attempt to record my snapshots, I get the following error message:
I'm able to fix this by adding the following permissions to my
app/src/main/AndroidManifest.xml
file:However, I don't want these permissions in my actual app. I want them to only be active for the instrumented test.
I tried adding those permissions to an
app/src/androidTest/AndroidManifest.xml
but it did not fix the problems. It only seems fixed when I include it in the app'sAndroidManifest.xml
.Steps to reproduce
ComposeTests
class toandroidTest
.\gradlew.bat debugExecuteScreenshotTests -Precord
Version of the library