Android 源码编译mk里导入androidx下的包
生活随笔
收集整理的這篇文章主要介紹了
Android 源码编译mk里导入androidx下的包
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
用 AS 生成的工程,默認支持 AndroidX ,用的 UI 控件也是 androidx 包下的。
用 Android 源碼編譯 AS 的工程時,會編譯不過,提示缺少 androidx 的包。
如使用 AppCompatActivity ,編譯時會提示
錯誤: 程序包androidx.appcompat.app不存在需要在 Android.mk 中添加如下,
LOCAL_STATIC_ANDROID_LIBRARIES := \androidx.recyclerview_recyclerview \androidx.preference_preference \androidx.appcompat_appcompat \androidx.annotation_annotation \androidx.legacy_legacy-preference-v14 \androidx.leanback_leanback-preference \androidx.leanback_leanback \androidx-constraintlayout_constraintlayout \com.google.android.material_material \用到哪些包就導入哪些包。
總結
以上是生活随笔為你收集整理的Android 源码编译mk里导入androidx下的包的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 主板检测卡c5_主板检测卡上的05.00
- 下一篇: cocos2d-x 源码分析 总目录