0

I am using an .aar file in my system-service as a library. This library has prebuilt native code inside of it (in the jni lib) and it gets loaded using System.loadLibrary("gojni");.

This all works in a normal android app in android studio, but it fails with a UnsatisfiedLinkError saying it can't be found in AOSP.

In AOSP I added the Library using this, in my Android.bp under frameworks/base/services:

android_library_import {
    name: "geth",
    aars: ["geth_android.aar"],
    sdk_version: "current",
}

I think it fails to copy the jni in the aar file, is there any way I can fix this?

4

0 回答 0