a ramazani
a ramazani

Reputation: 135

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

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?

Upvotes: 6

Views: 17452

Answers (8)

mahbub
mahbub

Reputation: 39

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

Upvotes: 1

wkm
wkm

Reputation: 407

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

Upvotes: 1

Vic.Jaye
Vic.Jaye

Reputation: 1

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

Upvotes: 0

manish bansal
manish bansal

Reputation: 136

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.

Upvotes: 0

Dheeraj Jaiswal
Dheeraj Jaiswal

Reputation: 364

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 **

Upvotes: 4

Makvin
Makvin

Reputation: 3629

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

Upvotes: 1

Philip Whitehouse
Philip Whitehouse

Reputation: 4157

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)

Upvotes: 11

user3426273
user3426273

Reputation:

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

Upvotes: 2

Related Questions