I am trying out Activity Transitions and when I paste below code in my values-21/styles.xml I get error:
cannot resolve symbol '@transition/explode'
<style name="BaseAppTheme" parent="android:Theme.Material">
<!-- enable window content transitions -->
<item name="android:windowContentTransitions">true</item>
<!-- specify enter and exit transitions -->
<item name="android:windowEnterTransition">@transition/explode</item>
<item name="android:windowExitTransition">@transition/explode</item>
<!-- specify shared element transitions -->
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform</item>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform</item>
</style>
Most often “R cannot be resolved” error appears if there is an issue with some of your resource files. Due to this error, you are unable to build your application. That's why we need to solve this error as it not getting away by just doing a simple restart or hitting Alt+Enter.
Android's transition framework allows you to animate all kinds of motion in your UI by simply providing the starting layout and the ending layout.
Simplest Answer - Replace it with @android:transition/explode
Did you create a res/transition/explode.xml
file with the following contents?
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
<explode />
</transitionSet>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With