Android 12 HIDL/AIDL error No more HIDL interfaces can be added to Android. Please use AIDL

2k Views Asked by At

I am trying to create new HIDL in android 12,I have done below steps:

  1. Added new HAL file in hardware/interfaces/logreader/1.0
  2. generated impl and bp file using hidl-gen
  3. added rc file, sepolicy,manifest and compatibility as well while building it getting below error : No more HIDL interfaces can be added to Android. Please use AIDL

Note : seen below reference and followed it but didn't help

https://programmerclick.com/article/1317904153/ https://devarea.com/android-hidl-and-project-treble/#.YoNpOHVBxH4

https://www.youtube.com/watch?v=j1v5yTOfo-4&list=PLIUuxxIJtMjWR77V4_QbKZY0gZb1kzoJ8&index=110

Please help me to resolve it

2

There are 2 best solutions below

0
On

As of Android 10, HIDL is deprecated and Android is migrating to use AIDL everywhere.

https://source.android.com/devices/architecture/hidl

0
On

The following trick worked for me:

During development, I added the interface to the map allAospHidlInterfaces in android/system/tools/hidl/build/hidl_interface.go