Android Studio: execution failed for task : app:compileDebugAidl FAILED

拥有回忆 提交于 2019-11-30 06:47:14

I had the same problem.

right click on app -> Open module settings. Set in this menu the 'Build Tools Version' to version 22.0.1.

After setting this I was able to build the project successfully.

I met the same problem and resolved by changing the Preferences -> Build,Execution,Deployment -> Build Tools -> Gradle -> Project-level settings from 'Use local gradle distribution' to 'Use default gradle wrapper (recommended)'.

Hope it helps.

goto File->settings->build->gradle and select Use default gradle wrapper (recommended)

I solved this problem by updating Android SDK build Tools.

SDK Manager > Tool > Android SDK build Tool > Install> Restart

Sometimes the source of the error is not very clear. I had attempted to refactor a package, but one of my classes had the old package name, making the compilation fail. I found the error by searching my path for the error generated in the Gradle console. I had the old package name in my project and I changed it myself. Then my APK compiled just fine.

Version Compatibility Post 1.0 Compatibility Starting with Android Studio 1.0 and the Gradle plugin for Android 1.0, compatibility is a critical requirement. While we are still looking at finalizing our policy you should at least expect:

Studio 1.x works with Gradle Plugin 1.y

Newer versions of the Gradle plugin may require newer versions of Studio to enable the new features in the IDE, but the project should open in older versions of Studio, and build from there (since Gradle does the build). We will be very careful about this.
 We will determine later our compatibility story between Studio 2.x and Gradle Plugin 1.x and between Studio 1.x and Gradle Plugin 2.x
We will make every effort to keep compatibility where possible, and to provide good Quick Assist to help with migration where applicable.

Gradle plugin 1.0.0 - 1.1.3 works with Gradle 2.2.1 - 2.3.

It does not work with Gradle 2.4+

Gradle plugin 1.2+ works with Gradle [2.2.1, 3.0[

Newer versions of the Plugin may require a newer version of Gradle to benefit from advanced features.

However the current 1.2+ should work with [2.2.1, 3.0[
(We cannot guaranteed compatibility with 3.x as it may introduce breaking changes: Gradle 1.x -> 2.0 introduced Groovy breaking changes)


Android Studio      Android Gradle Plugin      Gradle

1.0.0+               1.0.0 - 1.1.3           2.2.1 - 2.3
1.0.0+               1.2+                    2.2.1+

Post 1.0 DSL compatibility

The DSL changed a lot before 1.0, but it should be stable now.

If/When we need to change things we will have long deprecation periods, likely longer than 6 months, possibly 12 months. Preview Compatibility This table indicate compatibility for pre-1.0 components.

All this breaking changes happened because we tweaked the model exchanged between the IDE and Gradle a lot. All this work was to ensure stability after 1.0.

for more information go to http://tools.android.com/tech-docs/new-build-system/version-compatibility

Instead of running the whole app, try running a particular activity only which contains the <intent-filter> After that try running the whole app.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!