Error could not find aidl/activity

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Error could not find aidl/activity

897 次查看
Grigoriy
Contributor III

Hello,

 

I'm trying to build custom AAOS 14 based on nxp code. I extended CarSystemUI and flashed our board. When I tried to boot it booting stuck on bootanimation screen. And I looping this logs:

[ 2105.344347][ T6738] servicemanager: Caller(pid=6552,uid=1041,sid=u:r:audioserver:s0) Tried to start aidl service activity as a lazy service, but was unable to. Usually this happens when a service is not installed, but if the service is intended to be used as a lazy service, then it may be configured incorrectly.
[ 2106.332379][  T221] servicemanager: Caller(pid=6552,uid=1041,sid=u:r:audioserver:s0) Since 'activity' could not be found trying to start it as a lazy AIDL service. (if it's not configured to be a lazy service, it may be stuck starting or still starting).
[ 2106.360997][    T1] init: Control message: Could not find 'aidl/activity' for ctl.interface_start from pid: 221 (/system/bin/servicemanager)
[ 2106.375408][ T6739] servicemanager: Caller(pid=6552,uid=1041,sid=u:r:audioserver:s0) Tried to start aidl service activity as a lazy service, but was unable to. Usually this happens when a service is not installed, but if the service is intended to be used as a lazy service, then it may be configured incorrectly.
0 项奖励
回复
4 回复数

821 次查看
Grigoriy
Contributor III

Any advice or help please?

0 项奖励
回复

543 次查看
Maruti
Contributor III

Hii @Grigoriy 
Have you found a solution for this issue? It would be really helpful if you could share the details.

标记 (2)
0 项奖励
回复

889 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The "Could not find 'aidl/activity'" error in Android development likely indicates that the build system cannot locate an AIDL file named activity within the aidl directory structure. This usually means the AIDL file or the directory structure is missing or incorrectly configured. To resolve this, ensure the AIDL file (e.g., activity.aidl) exists in the correct location and that the build system is configured to recognize AIDL files. 
 
 
Here's a breakdown of the potential issues and how to fix them:
1. Missing or Misplaced AIDL File:
  • Check the file: Verify that an activity.aidl file exists.
  • Check the directory: Ensure the activity.aidl file is placed within the src/main/aidl directory of your Android project, or the appropriate source set if you're using custom source sets.
  • Package structure: The AIDL file's package declaration (e.g., package com.example.app.aidl;) must match the directory structure where it's located. If the file is in src/main/aidl/com/example/app/, the package declaration should be package com.example.app.aidl;. 
     
 
2. Build System Configuration (Android Gradle Plugin):
  • Enable AIDL: Make sure the aidl build feature is enabled in your app/build.gradle file. 
 
Código
 
    android {        buildFeatures {            aidl true        }    }
  • Source sets: If you are using custom source sets, you might need to specify the source directory for AIDL files in the sourceSets block. 
 
Código
 
    android {        sourceSets {            main {                aidl {                    srcDirs 'src/main/aidl'                }            }        }    }
3. Clean and Rebuild:
  • After making changes to the AIDL file or build configuration, clean and rebuild your project to ensure the changes are applied.
    • In Android Studio, go to Build > Clean Project and then Build > Rebuild Project. 
       
  • . Incremental Build (Android Studio):
    Android Studio's incremental build usually handles AIDL files efficiently, but if you encounter issues, try a full rebuild. 
     
 
 
5. Stable AIDL:
  • If you're working with stable AIDL, ensure that all dependencies of your AIDL interface are also defined as stable AIDL.
  • Convert any parcelables to stable parcelables by defining their structure directly in AIDL files. 
 
Example:
 
Let's say you have an AIDL interface called IMyInterface and you want to use it in your activity.
 
  1. Create IMyInterface.aidl:
Código
 
    // IMyInterface.aidl    package com.example.app.aidl;    interface IMyInterface {        void doSomething();    }
  1. Place it in src/main/aidl/com/example/app/:
     
 
Código
 
    my_app/    ├── src/    │   └── main/    │       ├── aidl/    │       │   └── com/    │       │       └── example/    │       │           └── app/    │       │               └── IMyInterface.aidl
  1. Enable AIDL in app/build.gradle: 
     
  1.  
Código
 
    android {        buildFeatures {            aidl true        }    }
  1. Clean and Rebuild. 
     
  1.  
By following these steps, you should be able to resolve the "Could not find 'aidl/activity'" error and successfully use your AIDL interface in your Android project. 
 
 
reegards
0 项奖励
回复

850 次查看
Grigoriy
Contributor III

Hi @Bio_TICFSL

Thank you for your respond. Here is what I found: 

1) I tried to find `activity.aidl` in all AAOS folders and it doesn't exist. 

2) In our code we don't use any `.aidl`

3) I tried to find in all AAOS code the call of `aidl/activity` by `grep` and there is no such a call.

4) The default CarSystemUI is working fine and we extended it without changing anything in the base code.

0 项奖励
回复