so just to be really clear:
Using
animateColorAsState
in a
@Preview
in an android library module resulted in no previews rendering. Changing the use of animateColorAsState to a static colour resulted in all the previews rendering correctly.
Upon replacing the static colour with
animateColorAsState
again, Android Studio notified me of the following exception:
Could not get applicationId for my.module.main. Project type: PROJECT_TYPE_LIBRARY
As a way of checking whether it was possible to placate the error, I placed
applicationId 'my.module'
in my build.gradle for my android library module, which resulted in the preview rendering successfully, with the AGP giving a warning that
applicationId
should not be in a library module.
Things I know:
applicationId
shouldn't be in the build.gradle for a library module
Things I don't know:
Why the preview using
animateColorAsState
won't render unless I place
applicationId
in my build.gradle