赞
踩
将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;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。