I recently upgraded to the gradle-3.0.0-alpha8 after which some styles are not resolved at compile time.
Develop envirment:
Error info:
Error:(94, 5) style attribute '@android:attr/windowExitAnimation' not found Error:(94, 5) style attribute '@android:attr/windowEnterAnimation' not found
Setting android.enableAapt2=false in gradle.properties file can solve this isuue.
But, Instant App need android.enableAapt2=true. What would i do?
All the problem was solved already.
Cause of the problem:
There are two modules, A_module, B_module.
B_module has a style:
<style name="my_style”>
<item
name="@android:windowEnterAnimation">@anim/anim_toast_show</item>
<item
name="@android:windowExitAnimation">@anim/anim_toast_hide</item>
</style>
If B_module compile(':A_module')
Build or Clean, report a error location in A_module->Res->values->styles:
Error:(94, 5) style attribute '@android:attr/windowExitAnimation' not found
Error:(94, 5) style attribute '@android:attr/windowEnterAnimation' not found
Solution:
Removing the "@" at the start of the item name.
<item name="@android:windowEnterAnimation">@anim/anim_toast_show</item>
<item name="@android:windowExitAnimation">@anim/anim_toast_hide</item>
to:
<item name="android:windowEnterAnimation">@anim/anim_toast_show</item>
<item name="android:windowExitAnimation">@anim/anim_toast_hide</item>