当前位置:   article > 正文

SystemUI导入第三方 jar包_aosp systemuisharedlib在哪里

aosp systemuisharedlib在哪里

将ant-1.8.2.jar包内置在Andorid.bp同级目录下的libs文件夹下

diff --git a/android/frameworks/base/packages/SystemUI/Android.bp b/android/frameworks/base/packages/SystemUI/Android.bp
index e148d4f547a..cf41baf6e2a 100644
--- a/android/frameworks/base/packages/SystemUI/Android.bp
+++ b/android/frameworks/base/packages/SystemUI/Android.bp

android_library {
    name: "SystemUI-core",
    defaults: [
        "SystemUI_compose_defaults",
    ],
    srcs: [
        "src/**/*.kt",
        "src/**/*.java",
        "src/**/I*.aidl",
        ":ReleaseJavaFiles",
    ],
    product_variables: {
        debuggable: {
            srcs: [":DebugJavaFiles"],
            exclude_srcs: [":ReleaseJavaFiles"],
        },
    },
    resource_dirs: [
        "res-product",
        "res-keyguard",
        "res",
    ],
    static_libs: [
        "WifiTrackerLib",
        "WindowManager-Shell",
        "SystemUIAnimationLib",
        "SystemUIPluginLib",
        "SystemUISharedLib",
        "SystemUICustomizationLib",
        "SystemUI-statsd",
        "SettingsLib",
        "androidx.core_core-ktx",
        "androidx.viewpager2_viewpager2",
        "androidx.legacy_legacy-support-v4",
        "androidx.recyclerview_recyclerview",
        "androidx.preference_preference",
        "androidx.appcompat_appcompat",
        "androidx.concurrent_concurrent-futures",
        "androidx.mediarouter_mediarouter",
        "androidx.palette_palette",
        "androidx.legacy_legacy-preference-v14",
        "androidx.leanback_leanback",
        "androidx.slice_slice-core",
        "androidx.slice_slice-view",
        "androidx.slice_slice-builders",
        "androidx.arch.core_core-runtime",
        "androidx.lifecycle_lifecycle-common-java8",
        "androidx.lifecycle_lifecycle-extensions",
        "androidx.lifecycle_lifecycle-runtime-ktx",
        "androidx.dynamicanimation_dynamicanimation",
        "androidx-constraintlayout_constraintlayout",
        "androidx.exifinterface_exifinterface",
        "androidx.test.ext.junit",
        "com.google.android.material_material",
        "kotlinx_coroutines_android",
        "kotlinx_coroutines",
        "iconloader_base",
        "SystemUI-tags",
        "SystemUI-proto",
        "monet",
        "dagger2",
        "jsr330",
        "lottie",
        "LowLightDreamLib",
        "motion_tool_lib",
    +    "apache-ant-jar",
    ],
    manifest: "AndroidManifest.xml",

    kotlincflags: ["-Xjvm-default=enable"],

    plugins: ["dagger2-compiler"],

    lint: {
        extra_check_modules: ["SystemUILintChecker"],
    },
}


 
+
+java_import {
+    name: "apache-ant-jar",
+    jars: ["libs/ant-1.8.2.jar"],
+}
+
 android_app {
     name: "SystemUI",
     defaults: [
@@ -393,7 +400,7 @@ android_app {
     system_ext_specific: true,
     certificate: "platform",
     privileged: true,


     kotlincflags: ["-Xjvm-default=enable"],
 
     dxflags: ["--multi-dex"],

[10]+  已停止               git diff Android.bp

编译完成后,就可以导入了

import org.apache.tools.tar.*;
import java.nio.charset.StandardCharsets;

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/265170?site
推荐阅读
相关标签
  

闽ICP备14008679号