I have an application in packages/apps
under my vendor dir in Android O.
The application relies on a HIDL interface, which is added as a java library.
If I build the app with Android.mk
file, it builds just fine.
If I build the app with Android.bp
file, hiding the Android.mk
, it doesn't build and fails with an error:
ninja: error: unknown target 'MODULES-IN-vendor-${vendor_name}-apps-${app_name}', did you mean 'MODULES-IN-vendor-${vendor_name}-apps-${another_app_name}'?
Or it can be just
ninja: error: unknown target 'MODULES-IN-vendor-${vendor_name}-apps-${app_name}'
My Android.bp
looks like:
android_app {
java_libs: ["some.hidl.lib-V1.0-java"],
java_static_libs: ["android.hidl.base-V1.0-java-static"],
srcs: ["**/*.java"],
android_resource_dirs: ["res/**"],
name: "MyApplication",
module_name: "MyApplication",
package_name: "me.myself.MyApplication", // also tried just the name as it is done in Android.mk
enabled: true,
proguard_enabled: disabled
}
Any ideas?
Not sure if you have resolved this issue, I also met such issue. This is caused by Android only tries to include the "Android.bp" file from the level 3 folder which is defined in "Android.bp" under root folder:
optional_subdirs = [
....
"vendor/*/*",
]
So you need to add one "Android.bp" into vendor/vendor_name/packages with specified optional_subdirs or just wildcard as above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With