CANNOT LINK EXECUTABLE library "libandroid.so" not found

  android, android-automotive, android-vts, c++, testing

In my android project i have tried to wrap the Tests under vts and build was success and when tried to run the tests i Have prompted with the linker error.
Below is the android.bp i have used.

Android.bp
cc_test {
name: "module_name",
//defaults: ["hidl_defaults"],
srcs: [":class_file_name"],

shared_libs: [
   "liblog",
   "libandroid",
   "libEGL",
   "libGLESv2",
   "libnativehelper",
   "libandroidicu",
   "libc++",
   "libc",
   "libm"
],
static_libs: [
   "libgmock",
  // "libgtest",
],
multilib: {
   lib32: {
        stem: "module_name",
   },
   lib64: {
        stem: "module_name",
   },
},
cflags: [
   "-O0",
   "-g",
   "-Wall",
   "-Wno-unused",
   "-Wno-unused-parameter",
   "-fexceptions",
   "-D__UNITTEST__",
   "-Wno-return-type",
   "-Wno-unused-private-field",
   "-fno-access-control"
],
gtest: true,
test_suites: ["vts"],

}

Source: Windows Questions C++

LEAVE A COMMENT