Sunday, April 14, 2013

Android Application AIDL error:

In android application, while working with AIDL, I observed an error.
My function is returning the class Employee. But I got the below error

Aidl: huey <= external/testapp/IMyService.aidl
external/testapp/Ioffice.aidl:16: couldn't find import for class com.sundar.Employee
make: *** [out/target/common/obj/JAVA_LIBRARIES/MyService_intermediates/src/com/IMyService.java] Error 1


IMyService.aidl

interface IOffice
{
 Employee get();
};


I have added the Employee.java which is derived from Parcelable class. I have also added this java file in make file.
But still I got this error.

How to resolve it:
I created the Employee.aidl and copied the below contents

package com.MyService;
parcelable Employee;

I copied the Employee.aidl and copied to the folder where Employee.java is there.Afterwards, it is compiling fine without any error.
 But Employee.aidl is not at all added in Android.mk

Labels: , , ,

0 Comments:

Post a Comment

<< Home