Android O, AOSP. I'm trying to use an HIDL java library inside an application in frameworks/base
.
According to the documentation, I've added the HIDL to Android.mk
file:
LOCAL_JAVA_LIBRARIES := vendor.myvendor.mylibrary-V1.0-java
In the MainActivity.java
, I include it and try to use:
import vendor.myvendor.mylibrary.V1_0.IGood;
public class MainActivity extends Activity {
public void onCreate(Bundle b) {
super.onCreate(b);
IGood service;
}
}
This code compiles without any errors. But when I try to access some methods, e.g.:
import vendor.myvendor.mylibrary.V1_0.IGood;
public class MainActivity extends Activity {
public void onCreate(Bundle b) {
super.onCreate(b);
IGood service = IGood.getService();
}
}
I get an error:
error: cannot access IBase
IGood server = IGood.getService();
^
class file for android.hidl.base.V1_0.IBase not found