BuildException: Failed to execute aapt in Android Studio 3.1 Canary 6

泄露秘密 提交于 2019-12-04 08:19:44

try this. I tried , it is working.

Android Studio > Help > Check For Update > Configure and select Canary Channel on spinner and click ok. After clean project and re build .

I had the same error as i added a dependency that uses the compile sdk version and the target sdk version greater to that of my project's compile sdk version. My projects Compile sdk version was 26 I added the easy permissions library that uses the compile sdk version 28. After adding the 'implementation 'pub.devrel:easypermissions:2.0.1'' above error was thrown. Fix was to made my compile sdk version to 28. Reason:

A library is compiled as part of the dependent application project, so the API used in >the library project must be compatible with the version of the Android library used to >compile the application project. In general, the library project should use an API level >that is the same as — or lower than — that used by the application. If the library >project uses an API level that is higher than that of the application, the application >project will not compile. It is perfectly acceptable to have a library that uses the >Android 1.5 API (API level 3) and that is used in an Android 1.6 (API level 4) or >Android 2.1 (API level 7) project, for instance.

gustavo

Try adding:

implementation 'com.android.support.constraint: constraint-layout: 1.0.2'

In your build.gradle {} dependencies In my case that was the problem, maybe some xml resources need to use constraint-layout......

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