Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Aidl error sdk build tools 29.0.0

Tags:

android

aidl

I upgraded my Android app to start using SDK 29 and build tools 29.0.0. When compiling in Android Studio I get an error:

Process 'command 'C:\Users\ma_fo\AppData\Local\Android\Sdk\build-tools\29.0.0\aidl.exe'' finished with non-zero exit value -1073741819

The actual command executed for aidl is C:\Users\ma_fo\AppData\Local\Android\Sdk\build-tools\29.0.0\aidl.exe with arguments { -pC:\Users\ma_fo\AppData\Local\Android\Sdk\platforms\android-29\framework.aidl -oE:\Work\McDevelopment\android-sales-app-webview\app\build\generated\aidl_source_output_dir\debug\compileDebugAidl\out -IE:\Work\McDevelopment\android-sales-app-webview\app\src\main\aidl -IE:\Work\McDevelopment\android-sales-app-webview\app\src\debug\aidl -IC:\Users\ma_fo.gradle\caches\transforms-2\files-2.1\c21a47fa6bee4a2c237691438c7b1f92\aidl -IC:\Users\ma_fo.gradle\caches\transforms-2\files-2.1\87cbfb92509988fa6d22255a681cc703\aidl -IC:\Users\ma_fo.gradle\caches\transforms-2\files-2.1\4cdb3bb0ddd100ba4f9a12ec5a9fae60\aidl -dC:\Users\ma_fo\AppData\Local\Temp\aidl367254395093906008.d E:\Work\McDevelopment\android-sales-app-webview\app\src\main\aidl\com\android\vending\billing\IInAppBillingService.aidl}

When I run this command manually in an MS-DOS prompt with aidl of build-tools 28.0.3, the compilation passes without any errors.

When I run this command with the aidl of build tools 29.0.0 I get an error: aidl E 06-08 18:07:03 4920 13216 io_delegate.cpp:141] Error while creating E:\Work\McDevelopment\android-sales-app-webview\app\build\generated\aidl_source_output_dir\debug\compileDebugAidl\out\E:: Invalid argument

I would expect the manual idl compilation to work for both versions. Is there are problem with the aidl in build tools 29.0.0 ? Or is there something else which I should update ?

like image 917
Marcel Avatar asked Jun 08 '19 21:06

Marcel


People also ask

What is AIDL file in Android Studio?

The Android Interface Definition Language (AIDL) is similar to other IDLs you might have worked with. It allows you to define the programming interface that both the client and service agree upon in order to communicate with each other using interprocess communication (IPC).

What are Android SDK build tools?

Android SDK build tools are used to debug, build, run and test an Android application. Android Build Tools can be used to develop and work from command line or IDE (i.e Eclipse or Android Studio). Also used to connect Android devices and root them.

How do I install buildToolsVersion?

To download it, go to Tools > Android > SDK Manager, then click on the "SDK Tools" tab at the top of the new window. Then select the "Show Package Details" checkbox in the lower right-hand corner. Finally, scroll down to where you see 26.0. 2, check the checkbox next to it, and click "OK" to begin the install process.


2 Answers

In my case the *.d file in the -d parameter has a error in the first line.

From build tools 28.0.3:

C:\[PROJECT-PATH]\app\build\generated\aidl_source_output_dir\debug\compileDebugAidl\out\com\android\vending\billing\IInAppBillingService.java : \

From build tools 29.0.0

C:\[PROJECT-PATH]\app\build\generated\aidl_source_output_dir\debug\compileDebugAidl\out\C:\[PROJECT-PATH]\app\src\main\aidl\com\android\vending\billing\IInAppBillingService.java : \

But I have no solution. I think it is a bug in the build tools 29.0.0.

Update: The build tools version 29.0.1 has solved this problem.

like image 67
MiDo Avatar answered Sep 21 '22 10:09

MiDo


It's a known issue which supposedly have been fixed, but it's not: https://issuetracker.google.com/issues/132344897

like image 38
ballzak Avatar answered Sep 20 '22 10:09

ballzak