Closed BsBrabi closed 2 years ago
@BsBrabi Is it only about sample app or your own app as well? If it's about your app, then I think you should be able to fix it without changing Shot library.
android:exported needs to be explicitly specified for
I suspect that this error is not related to the Shot library. Could you please try to run ./gradlew assembleDebugAndroidTest
and let me know if you see the same error or not.
The reason for this error is behavior change in Android 12
If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components.
https://developer.android.com/about/versions/12/behavior-changes-12#exported
Sorry, looks like it really is a problem in our app. I just tried the Shot library with another app sample, and I got it working.
Expected behaviour
All gradle tasks work when targetSdkVersion is set to 31.
Actual behaviour
./gradlew executeScreenshotTests -Precord
fails with the following error message:Steps to reproduce
Reproducable with sample app, when all targetSdkVersion and compileSdkVersion are set to 31.
Version of the library
5.13.0