All dependencies of an Android.bp file must be in Android.bp, not
Android.mk. So you'll need to convert your libmine description to an
Android.bp file.

- Dan

On Wed, Sep 18, 2019 at 1:51 PM Jack Rong <[email protected]> wrote:

> I have a scenario that is to link in a Java static library built from an
> Android.mk file to complete the whole AOSP image build in Android P. The
> build system somehow is not versatile enough to discover the static library
> built from other project using the Android.mk. Here is an example:
>
>  1) Android.mk file at the "package/app/MyLibs"
>
> LOCAL_PATH := $(call my-dir)
>
> include $(CLEAR_VARS)
>
> LOCAL_MODULE := libmine
>
> LOCAL_SRC_FILES := \
> $(call all-java-files-under, src/main/java) \
> $(call all-Iaidl-files-under, src/main/aidl)
>
> ifneq ($(filter 28,$(PLATFORM_SDK_VERSION)),)
> LOCAL_PRIVATE_PLATFORM_APIS := true
> else
> LOCAL_SDK_VERSION := current
> endif
>
> LOCAL_STATIC_JAVA_LIBRARIES := libgson
>
> LOCAL_PROGUARD_FLAG_FILES := proguard.flags
>
> include $(BUILD_STATIC_JAVA_LIBRARY)
>
>
> 2) Android.bp at "frameworks/base/services/devicepolicy"
>
> java_library_static {
>     name: "services.devicepolicy",
>     srcs: ["java/**/*.java"],
>
>     libs: [
>         "conscrypt",
>         "services.core",
>     ],
>     static_libs: [
>         "libmine",
>     ],
> }
>
> 3) Build message:
>
> error: frameworks/base/services/devicepolicy/Android.bp:1:1:
> "services.devicepolicy" depends on undefined module "libmine"
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/7b078f33-17a4-47c4-b202-7a29d08f0253%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/7b078f33-17a4-47c4-b202-7a29d08f0253%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CALQgHdn8EaRAX2hZwyt2OiZm1N9KM63s%2Bx_yPdvs6o9iBx6fsQ%40mail.gmail.com.

Reply via email to