Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle引用pingpp-ui报错:error: style attribute '@android:attr/windowEnterAnimation' not found. #63

Open
Archieeeeee opened this issue May 30, 2018 · 4 comments

Comments

@Archieeeeee
Copy link

Archieeeeee commented May 30, 2018

根据报错信息,在官方升级gradle plugin文档中找到 https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration

Incorrect use of @ resource reference symbols
AAPT2 now throws build errors when you omit or incorrectly place resource reference symbols (@). For example, consider if you omit the symbol when specifying a style attribute, as shown below:
<item name="@android:windowEnterAnimation"/>

When building the module, AAPT2 now throws the following build error:

Error: style attribute '@android:attr/windowEnterAnimation' not found

原因是pingpp_ui/res/values/styles.xml引用了错误的“@”符号?

<style name="mystyle" parent="android:Animation">
    <item name="@android:windowEnterAnimation">@anim/dialog_enter</item>
    <item name="@android:windowExitAnimation">@anim/dialog_exit</item>
</style>
@JunWeiAndroid
Copy link

同样的问题,as3.1还不能设置aapt,已找到解决方法

@Archieeeeee
Copy link
Author

@JunWeiAndroid 怎么解决的,我是在工程里定义一个同名的style,这样就会覆盖第三方库的定义了

@X-Chuck
Copy link

X-Chuck commented Jun 14, 2018

@JunWeiAndroid 请问你是怎么解决的?

@dong11
Copy link
Contributor

dong11 commented Jun 22, 2018

可以在 gradle.properties 中添加 android.enableAapt2=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants