I am trying to build an Android application inside of AOSP.
I have defined the Android.bp file as follows
cc_prebuilt_library_shared {
name: "libPrintString",
target: {
android_arm: {
srcs: ["lib/libPrintString.so"],
},
android_arm64: {
srcs: ["lib64/libPrintString.so"],
},
},
strip: { none:true, },
}
java_import {
name: "stringutils",
jars: ["libs/stringutils.jar"],
}
android_app {
name: "HelloWorld",
srcs: ["src/**/*.java",],
platform_apis: true,
product_specific: true,
certificate: "platform",
privileged: true,
static_libs: [
"com.google.android.material_material",
"androidx-constraintlayout_constraintlayout",
"stringutils",
],
jni_libs: ["libPrintString"]
}
I have put my application in the /packages/apps folder, the project has the following structure
+ HelloWorld
- Android.bp
- AndroidManifest.xml
+ lib
- libPrintString.so
+ lib64
- libPrintString.so
+ libs
- stringutils.jar
+ res
+ src
When I am calling make I am getting an error
FAILED: ninja: 'out/target/product/mydroid/product/lib64/libPrintString.so', needed by 'out/target/product/mydroid/product.img', missing and no known rule to make it
Can someone please help me to find a solution?