Gradle Build Error : aidl.exe finished with non-zero exit value 1

无人久伴 提交于 2019-12-10 13:27:09

问题


this is my build.gradle file:

click to see screenshot

and my error :

Error:Execution failed for task ':app:compileDebugAidl'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\dev\sdk\build-tools\22.0.1\aidl.exe'' finished with non-zero exit value 1

how can I fix this error?


回答1:


Run Gradle with debug enabled (e.g. gradlew build --debug) to see the actual reason.

Common issues include:

  • Package doesn't match manifest
  • Multiple methods with the same method name (aidl doesn't support this as far as I can tell)



回答2:


After a lot of search I found solution

Because of we copied IInAppBillingService.aidl file from trivial drive project into our project.

The package name of that file is not changed according to our project so we need to manually change the package name of IInAppBillingService.aidl file which is written at the first line of the file.

This solve the problem of **aidl.exe finished with non-zero exit value 1 **




回答3:


Check your package declaration in your Aidl file. Also if that doesn't solve then show complete log.




回答4:


package name under aidl file is not match with your original package name.Check your package name of aidl file.




回答5:


For me , it is because the aidl file name does not match the declared interface name.




回答6:


I was also facing similar error but it was in aapt.exe, I tried

  1. clean/build
  2. Invalidate cache/ restart

but after doing lots of search, I commented my all last added code and it starts working..
then I start adding small code and run it..

I found the following line:

android:background=""

After removing it starts working fine. I hope it will help someone.




回答7:


I just try create *.aidl in App -> new File -> new AIDL, then problem solved. So maybe the location that create the file does matter, FYR




回答8:


In my case, upgrading build-tool version in app gradle script solve the problem



来源:https://stackoverflow.com/questions/34005899/gradle-build-error-aidl-exe-finished-with-non-zero-exit-value-1

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