android studio 导入项目时遇到的坑

Error:(2290) error: style attribute '@android:attr/windowEnterAnimation' not found.
Error:(2291) error: style attribute '@android:attr/windowExitAnimation' not found.
Error:(2290) style attribute '@android:attr/windowEnterAnimation' not found.
Error:(2291) style attribute '@android:attr/windowExitAnimation' not found.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.

> Failed to execute aapt


这是aapt2导致的,3.0默认启用了aapt2。

解决办法是在project的根目录下的gradle.properties最后添加关闭aapt2的代码:

android.enableAapt2=false


你可能感兴趣的:(Android,学习)