Android view library existing in source code compilation

Android view library existing in source code compilation

Problem scenario:

Android.mk wants to introduce android libraries such as appcompat, but I don't know the full name of his library.

Solution:

You can find it in the source code like this: find prebuilts/sdk/ -name Android.bp | xargs grep “name.*appcompat”

The search result is:

、、、

prebuilts/sdk/current/androidx/Android.bp: name: “androidx.appcompat_appcompat-nodeps”, prebuilts/sdk/current/androidx/Android.bp: name: “androidx.appcompat_appcompat”, prebuilts/sdk/current/androidx/Android.bp: name: “androidx.emoji_emoji-appcompat-nodeps”, prebuilts/sdk/current/androidx/Android.bp: name: “androidx.emoji_emoji-appcompat”, prebuilts/sdk/current/support/Android.bp: name: “android-support-v7-appcompat-nodeps”, prebuilts/sdk/current/support/Android.bp: name: “android-support-v7-appcompat”, prebuilts/sdk/current/support/Android.bp: name: “android-support-emoji-appcompat-nodeps”, prebuilts/sdk/current/support/Android.bp: name: “android-support-emoji-appcompat”,

、、、

Then select the androidx.appcompat_appcompat import

The use of Android.mk is as follows:


LOCAL_STATIC_ANDROID_LIBRARIES += \
    androidx.appcompat_appcompat \
    androidx-constraintlayout_constraintlayout \
    androidx.recyclerview_recyclerview \
。。。

For precompiled packages that exist in other systems, you can also refer to this method to confirm whether they exist in the system source code.
The corresponding existing ones can be used directly, otherwise the jar package can be imported and pre-compiled with mk for reuse.

Mutual encouragement: things in the world are difficult and easy, but doing them is not difficult.

Guess you like

Origin blog.csdn.net/wenzhi20102321/article/details/122889502