androidaidl

Unable to import AIDL


I have created new AIDL after write click on android in android studio as below:

interface ICalculator {
/**
 * Demonstrates some basic types that you can use as parameters
 * and return values in AIDL.
 */
void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat,
        double aDouble, String aString);
}

But it is not importing in my service and getting "Can not resolve ICalculator"


Solution

  • You must build the project first so the java file for this aidl can be generated and you can use it in your project