Error: Skin for * cannot be found. -isolate-styles=false

本文解决了一个具体的Flex应用程序中出现的皮肤加载错误问题,通过调整编译参数来避免皮肤找不到的问题。
<span style="color:#ff6666;">Error: Skin for Group3060.Panel3059.SkinnableContainerSkin3075.contentGroup.VBox3062.TextArea3071 cannot be found.
	at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
	at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
	at spark.components.supportClasses::SkinnableComponent/commitProperties()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:457]
	at spark.components.supportClasses::SkinnableTextBase/commitProperties()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableTextBase.as:1682]
	at spark.components::TextArea/commitProperties()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\TextArea.as:621]
	at mx.core::UIComponent/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8219]
	at mx.managers::LayoutManager/validateClient()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:957]
	at mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:382]
	at mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManager.as:193]
	at com.bsth.gis.util::Common$/ShowPopup()[E:\FlexWorkSpace\GIS-T\src\com\bsth\gis\util\Common.as:174]
	at com.bsth.gis.util::MapShowManager/ldDataQuery()[E:\FlexWorkSpace\GIS-T\src\com\bsth\gis\util\MapShowManager.as:1639]
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:993]
	at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
	at mx.rpc::Responder/result()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
	at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84]
	at DirectHTTPMessageResponder/completeHandler()[E:\dev\4.y\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:451]
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at flash.net::URLLoader/onComplete()</span>

右击项目-->属性-->flex 编译器-->附加的编译参数下增加:-isolate-styles=false


flutter安装image_gallery_saver后运行报错,怎么解决 FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * What went wrong: A problem occurred configuring project ':image_gallery_saver'. > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Failed to query the value of property 'buildFlowServiceProperty'. > Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@4e390559 of type BuildFlowService.Parameters > A problem occurred configuring project ':image_gallery_saver'. > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. ============================================================================== BUILD FAILED in 1s Running Gradle task 'assembleDebug'... 2,434ms Error: Gradle task assembleDebug failed with exit code 1 PS D:\develop\Flutter\ProjectTest\words_myths> flutter run Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Launching lib\main.dart on M2007J22C in debug mode... Support for Android x86 targets will be removed in the next stable release after 3.27. See https://github.com/flutter/flutter/issues/157543 for details. FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * What went wrong: A problem occurred configuring project ':image_gallery_saver'. > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Failed to query the value of property 'buildFlowServiceProperty'. > Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@312973b2 of type BuildFlowService.Parameters > A problem occurred configuring project ':image_gallery_saver'. > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. ============================================================================== BUILD FAILED in 1s Running Gradle task 'assembleDebug'... 2,546ms Error: Gradle task assembleDebug failed with exit code 1 PS D:\develop\Flutter\ProjectTest\words_myths>
06-22
android studio报错FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:processDebugResources'. > Could not isolate parameters com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@5a08f1f of artifact transform AarResourcesCompilerTransform > Could not isolate value com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@5a08f1f of type AarResourcesCompilerTransform.Parameters > Could not resolve all files for configuration ':app:detachedConfiguration2'. > Failed to transform aapt2-8.5.0-11315950-windows.jar (com.android.tools.build:aapt2:8.5.0-11315950) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not download aapt2-8.5.0-11315950-windows.jar (com.android.tools.build:aapt2:8.5.0-11315950): No cached version available for offline mode * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:processDebugAndroidTestResources'. > Could not isolate parameters com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@5a08f1f of artifact transform AarResourcesCompilerTransform > Could not isolate value com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@5a08f1f of type AarResourcesCompilerTransform.Parameters > Could not resolve all files for configuration ':app:detachedConfiguration2'. > Failed to transform aapt2-8.5.0-11315950-windows.jar (com.android.tools.build:aapt2:8.5.0-11315950) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not download aapt2-8.5.0-11315950-windows.jar (com.android.tools.build:aapt2:8.5.0-11315950): No cached version available for offline mode
08-25
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <style> body { margin: 0; height: 100vh; background: url("引用自己的背景图") center no-repeat; background-size: 100% 100%; } .glass-container { position: fixed; overflow: hidden; box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.1); border-radius: 200px; width: 200px; height: 200px; background: rgba(255, 255, 255, 0.25); } .glass-filter { position: absolute; inset: 0; z-index: 0; backdrop-filter: blur(4px); filter: url(#lg-dist); /*创建独立渲染区,防止影响容器中的内容*/ isolation: isolate; } .glass-specular { position: absolute; inset: 0; z-index: 2; border-radius: inherit; overflow: hidden; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.75), inset 0 0 5px rgba(255, 255, 255, 0.75); } </style> <body> <!--玻璃容器--> <div class="glass-container"> <!--使用液态滤镜--> <div class="glass-filter"></div> <!--边沿效果--> <div class="glass-specular"></div> </div> <!--创建液态滤镜--> <svg style="display: none"> <filter height="100%" id="lg-dist" width="100%" x="0%" y="0%"> <!--生成噪声图案--> <feTurbulence baseFrequency="0.008 0.008" numOctaves="2" result="noise" seed="92" type="fractalNoise"/> <!--模糊噪声--> <feGaussianBlur in="noise" result="blurred" stdDeviation="2"/> <!--根据模糊噪声的处理结果,形成扭曲效果--> <feDisplacementMap in="SourceGraphic" in2="blurred" scale="70" xChannelSelector="R" yChannelSelector="G"/> </filter> </svg> <script> window.onload = () => { const container = document.querySelector('.glass-container') document.onmousemove = (e) => { container.style.left = e.x - 100 + 'px' container.style.top = e.y - 100 + 'px' } } </script> </body> </html> 在safari中没效果
07-04
[versions] ######## Codes denpendency versions ######## # Build plugins: androidGradlePlugin = "8.2.2" oapm = "3.0.8.1" obuild = "1.7.0" protobufPlugin = "0.9.4" androidToolsR8 = "8.2.42" # Kotlin libs: kotlin = "1.9.22" kotlinCoroutines = "1.7.3" kotlinSerializationJson = "1.6.2" koin = "3.4.3" koinCoroutines = "3.4.1" # Android libs: chips = "1.0.0" # Androidx libs: coreKtx = "1.12.0" appcompat = "1.6.1" room = "2.4.3" pagingKtx = "3.2.1" fragmentKtx = "1.4.1" lifecycle = "2.6.2" recyclerview = "1.2.1" constraintlayout = "2.1.3" # Google libs: material = "1.11.0" protobuf = "3.23.0" protobufProtoc = "3.10.0" gson = "2.10.1" # Oplus libs: addon = "15.0.34.17-preview" apiAdapter = "13.3.5" couiSupport = "15.0.28" couiMaterialcolor = "1.0.1" olint = "1.2.5" trackinglib = "1.0.3" feedbackCdp = "15.0.4" feedbackEnvDomestic = "1.0.1" synergysdk = "14.1.10" castsdk = "4.1.4" oplusSettings = "2.1.1" oapsSdkDownload = "3.1.2" sauaar = "3.0.3" sysapi = "13.0.6" push = "3.5.3" #dmpSdk = "2.0.0-betafab8c2d-SNAPSHOT" dmpSdk = "2.1.1" dmpSdkExport = "2.3.0-20240903.080150-1" aiunit = "1.1.0" stdid = "1.0.8" oworkSync = "1.0.2-beta" appfeature = "1.0.2" oplusTrack = "3.0.13" oplusCloudconfig = "3.4.8" oplusCloudconfigTest = "1.0.0" heytapCloudconfigTest = "0.0.7" pantanalCardSeedling = "3.0.1" oplusBackup = "2.0.0" onetSdk = "14.4.60" dfsSdk = "1.0.1-alpha62bb292-SNAPSHOT" ptcSdk = "1.0.1-alpha7066ba4-SNAPSHOT" accessorySdk = "3.0.35" oplusTBLPlayer = "1.7.9PRO" remoteControlSdk = "15.0.0-alphacd8fa13-SNAPSHOT" workmanagerversion = "2.7.0" # HeyTap libs: addonAdapter = "11.2.5" cloudDrive = "1.1.8" cloudBase = "1.1.3" ucAccountSDK = "2.5.1" heytapTrack = "1.1.3.1" heytapNearxUtils = "1.0.8.security" heytapProtobuff = "2.2.0.222" heytapCloudconfig = "2.4.2.9" adOverseas = "2.24.0" tapHttpVerSion = "4.9.3.8.1" heytapCloudkitCommonVersion="2.2.10" heytapCloudkitSyncVersion="2.2.10" # 3rd parts libs: findbugs = "3.0.2" okio = "3.7.0" okhttp3 = "4.12.0" glide = "4.16.0" wechatSdk = "6.8.24" retrofit2 = "2.9.0" retrofit2Protobuf = "2.9.0" commonsCompress = "1.21" commonsLogging = "1.3.0" commonsIo = "2.15.1" commonsCodec = "1.6" zip4j = "2.11.5" unrar = "1.0.0" gnuCrypto = "2.0.1" tika = "2.8.0" cryptography = "2.1.1" slf4j = "2.0.10" rxjava = "3.1.8" wpsSdkSnapshot = "20210524-SNAPSHOT" maxVersion = "12.6.1" googleAdapter = "23.6.0.1" facebookAdapter = "6.18.0.1" mytargetAdapter = "5.27.0.0" bytedanceAdapter = "6.4.0.3.0" # FileManager inner libs: fileManagerThumbnail = "15.12.34-alpha7640294-SNAPSHOT" fileManagerThumbnailWpsCompat = "15.11.0-beta1a8f9af-SNAPSHOT" fileManagerSimulateClick = "15.11.4-beta7146442-SNAPSHOT" fileManagerDragDrop = "15.11.0-beta1a8f9af-SNAPSHOT" ######## Unit test denpendency versions ######## # Base test libs: jacoco = "0.8.7" junit = "4.13.2" mockito = "3.11.2" mockk = "1.12.1" kotlinCoroutinesTest = "1.6.0" robolectric = "4.10" powermock = "2.0.9" # Androidx test libs: androidxCoreTest = "2.1.0" # 3rd parts libs: json = "20231013" # riskctrl riskctrl="1.1.6" ######## AndroidTest denpendency versions ######## # Androidx test libs: espresso = "3.5.1" testRunner = "1.4.0" testRules = "1.4.0" testTruth = "1.4.0" androidxJunit = "1.1.5" uiautomator = "2.2.0" roomTesting = "2.2.5" # Oplus test libs: oTestLib = "1.4.1" oTestCoverage = "2.0.6@aar" [libraries] ######## Codes denpendencies ######## # Build plugins: android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" } oplus-oapm-plugin = { module = "com.oppo.test:oapm-perf", version.ref = "oapm" } oplus-build-plugin = { module = "com.inno.buildplugin:build-plugin", version.ref = "obuild" } google-protobuf-plugin = { module = "com.google.protobuf:protobuf-gradle-plugin", version.ref = "protobufPlugin" } android-tools-r8 = { module = "com.android.tools:r8", version.ref = "androidToolsR8" } # Kotlin libs: kotlin-stdlib-common = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinCoroutines" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinSerializationJson" } koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" } koin-core-coroutines = { module = "io.insert-koin:koin-core-coroutines", version.ref = "koinCoroutines" } koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" } # Android libs: android-ex-chips = { module = "com.android.ex.chips:chips", version.ref = "chips" } # Androidx libs: androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" } androidx-room-paging = { module = "androidx.room:room-paging", version.ref = "room" } androidx-paging-ktx = { module = "androidx.paging:paging-runtime-ktx", version.ref = "pagingKtx" } androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentKtx" } androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" } androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "lifecycle" } androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle" } androidx-lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version.ref = "lifecycle" } androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } androidx-workmanager-ktx = {module = "androidx.work:work-runtime-ktx", version.ref = "workmanagerversion"} google-material = { module = "com.google.android.material:material", version.ref = "material" } google-protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" } google-protobuf-protoc = { module = "com.google.protobuf:protoc", version.ref = "protobufProtoc" } google-gson = { module = "com.google.code.gson:gson", version.ref = "gson" } # Oplus libs: oplus-check-olint = { module = "com.sectools.check:olint", version.ref = "olint" } oplus-appcompat-base = { module = "com.oplus.appcompat:base", version.ref = "couiSupport" } oplus-appcompat-controls = { module = "com.oplus.appcompat:controls", version.ref = "couiSupport" } oplus-appcompat-bars = { module = "com.oplus.appcompat:bars", version.ref = "couiSupport" } oplus-appcompat-lists = { module = "com.oplus.appcompat:lists", version.ref = "couiSupport" } oplus-appcompat-panel = { module = "com.oplus.appcompat:panel", version.ref = "couiSupport" } oplus-appcompat-responsiveui = { module = "com.oplus.appcompat:responsiveui", version.ref = "couiSupport" } oplus-appcompat-component = { module = "com.oplus.appcompat:component", version.ref = "couiSupport" } oplus-material-color = { module = "com.oplus.materialcolor:coui-material-color", version.ref = "couiMaterialcolor" } oplus-tool-trackinglib = { module = "com.oplus.tool.trackinglib:trackinglib", version.ref = "trackinglib" } oplus-feedback-cdp = { module = "com.customer.feedback.sdk:feedback-cdp", version.ref = "feedbackCdp" } oplus-feedback-env-domestic = { module = "com.customer.feedback.sdk:feedback-env-domestic", version.ref = "feedbackEnvDomestic" } oplus-synergy-compat = { module = "com.oplus.synergysdk:synergysdkcompat", version.ref = "synergysdk" } oplus-cast-sdk = { module = "com.oplus.cast.api:castsdk", version.ref = "castsdk" } oplus-appprovider-settings = { module = "com.oplus.appprovider:settings-oplus", version.ref = "oplusSettings" } oplus-sau-coui = { module = "com.oplus.sauaar:coui-sauaar", version.ref = "sauaar" } oplus-aiunit-core = { module = "com.oplus.aiunit.open:core", version.ref = "aiunit" } oplus-aiunit-nlp = { module = "com.oplus.aiunit.open:nlp", version.ref = "aiunit" } oplus-stdid-sdk = { module = "com.oplus.stdid.sdk:sdk", version.ref = "stdid" } oplus-owork-sync = { module = "com.oplus.owork:sync-sdk", version.ref = "oworkSync" } oplus-coreapp-appfeature = { module = "com.oplus.coreapp.appfeature:AppFeatureHelper", version.ref = "appfeature" } oplus-statistics-track = { module = "com.oplus.statistics:track", version.ref = "oplusTrack" } oplus-cloudconfig-base = { module = "com.oplus.nearx:cloudconfig", version.ref = "oplusCloudconfig" } oplus-cloudconfig-env = { module = "com.oplus.nearx:cloudconfig-env", version.ref = "oplusCloudconfig" } oplus-cloudconfig-testenv = { module = "com.nearx.test:env", version.ref = "oplusCloudconfigTest" } heytap-cloudconfig-testenv = { module = "com.heytap.test:env", version.ref = "heytapCloudconfigTest"} oplus-pantanal-card-seedling = { module = "com.oplus.pantanal.card:seedling-support-internal", version.ref = "pantanalCardSeedling" } oplus-backup-sdk = { module = "com.oplus.backup:backup-sdk", version.ref = "oplusBackup" } oplus-onet-sdk = { module = "com.oplus.onet:sdk", version.ref = "onetSdk" } oplus-dfs-sdk = { module = "com.oplus.dfs:dfssdk", version.ref = "dfsSdk" } oplus-ptc-sdk-core = { module = "com.oplus.pantaconnect.sdk:core", version.ref = "ptcSdk" } oplus-ptc-sdk-connect = { module = "com.oplus.pantaconnect.sdk:connectionservice", version.ref = "ptcSdk" } oplus-ptc-sdk-ext = { module = "com.oplus.pantaconnect.sdk:extensions", version.ref = "ptcSdk" } oplus-ptc-sdk-protocol = { module = "com.oplus.pantaconnect.sdk:protocol-plugin", version.ref = "ptcSdk" } oplus-accessory-sdk = { module = "com.heytap.accessory:sdk", version.ref = "accessorySdk" } oplus-addon-sdk = { module = "com.oplus.sdk:addon", version.ref = "addon" } oplus-api-adapter-compat = { module = "com.oplus.support:api-adapter-compat", version.ref = "apiAdapter" } oplus-api-adapter-oplus = { module = "com.oplus.support:api-adapter-oplus", version.ref = "apiAdapter" } oplus-sysapi = { module = "com.oplus.appplatform:sysapi", version.ref = "sysapi" } oplus-dmp-sdk = { module = "com.oplus.dmp.sdk:connect", version.ref = "dmpSdk" } oplus-dmp-sdk-export = { module = "com.oplus.dmp.sdk:connect-export", version.ref = "dmpSdkExport" } oplus-tbl-player = { module = "com.oplus.TBLPlayer:CommonPlayer", version.ref = "oplusTBLPlayer" } oplus-remotecontrol-sdk = { module = "com.oplus.remotecontrol:remotecontrolsdk", version.ref = "remoteControlSdk" } oplus-push = { module = "com.heytap.msp:push", version.ref = "push" } # HeyTap libs: heytap-addon-adapter = { module = "com.heytap.support:addon-adapter", version.ref = "addonAdapter" } heytap-cloud-drive = { module = "com.heytap.cloud:clouddisksdk", version.ref = "cloudDrive" } heytap-cloud-base = { module = "com.heytap.cloud:base", version.ref = "cloudBase" } heytap-account-uc = { module = "com.heytap.accountsdk:UCAccountSDK_Base_heytap", version.ref = "ucAccountSDK" } heytap-nearx-track = { module = "com.heytap.nearx:track", version.ref = "heytapTrack" } heytap-nearx-utils = { module = "com.heytap.nearx:utils", version.ref = "heytapNearxUtils" } heytap-nearx-protobuff = { module = "com.heytap.nearx.protobuff:wire-runtime-isolate", version.ref = "heytapProtobuff" } heytap-cloudconfig-base = { module = "com.heytap.nearx:cloudconfig", version.ref = "heytapCloudconfig" } heytap-cloudconfig-env = { module = "com.heytap.nearx:cloudconfig-env-oversea", version.ref = "heytapCloudconfig" } heytap-cloudconfig-area = { module = "com.heytap.nearx:cloudconfig-area", version.ref = "heytapCloudconfig" } opos-ad-overseas = { module = "com.opos.ad:overseas-ad-global-pub", version.ref = "adOverseas" } #opos-ad-overseas = { module = "com.opos.ad:overseas-ad-global-dev", version.ref = "adOverseas" } taphttp = { module = "com.heytap.nearx:taphttp", version.ref = "tapHttpVerSion" } taphttp-domestic = { module = "com.heytap.nearx:taphttp-env", version.ref = "tapHttpVerSion" } taphttp-env = { module = "com.heytap.nearx:taphttp-env-oversea", version.ref = "tapHttpVerSion" }#HttpDns需要 oppo-marker-oaps-download = { module = "com.oppo.market:oaps_sdk_download", version.ref = "oapsSdkDownload" } heytap-cloudkit-common = { module = "com.heytap.cloudkit.libcommon:libcommon", version.ref = "heytapCloudkitCommonVersion"} heytap-cloudkit-sync = { module = "com.heytap.cloudkit.libsync:libsync", version.ref = "heytapCloudkitSyncVersion"} gis-riskctrl = { module = "com.heytap.gis:riskctrl", version.ref = "riskctrl" } # 3rd parts libs: findbugs = { module = "com.google.code.findbugs:jsr305", version.ref = "findbugs" } okio = { module = "com.squareup.okio:okio", version.ref = "okio" } squareup-okhttp3-okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp3" } squareup-okhttp3-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp3" } squareup-retrofit2-retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit2" } squareup-retrofit2-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit2" } squareup-retrofit2-adapter = { module = "com.squareup.retrofit2:adapter-rxjava3", version.ref = "retrofit2" } squareup-retrofit2-protobuf = { module = "com.squareup.retrofit2:converter-protobuf", version.ref = "retrofit2Protobuf" } bumptech-glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } bumptech-glide-base = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } tencent-sdk-wechat = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdk" } apache-commons-compress = { module = "org.apache.commons:commons-compress", version.ref = "commonsCompress" } apache-commons-logging = { module = "commons-logging:commons-logging", version.ref = "commonsLogging" } apache-commons-io = { module = "commons-io:commons-io", version.ref = "commonsIo" } apache-commons-codec = { module = "commons-codec:commons-codec", version.ref = "commonsCodec" } apache-tika-core = { module = "org.apache.tika:tika-core", version.ref = "tika" } lingala-zip4j = { module = "net.lingala.zip4j:zip4j", version.ref = "zip4j" } innosystec-unrar-java = { module = "de.innosystec.unrar:java-unrar", version.ref = "unrar" } gnu-crypto = { module = "gnu.crypto:crypto", version.ref = "gnuCrypto" } allawn-crypto-android = { module = "com.allawn.cryptography:crypto-android-sdk", version.ref = "cryptography" } slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } rxjava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxjava" } wps-sdk-snapshot = { module = "com.wps.sdk:snapshot", version.ref = "wpsSdkSnapshot" } # FileManager Inner libs: oplus-filemanager-thumbnail = { module = "com.oplus.filemanager:thumbnail", version.ref = "fileManagerThumbnail" } oplus-filemanager-thumbnailWpsCompat = { module = "com.oplus.filemanager:thumbnail_wps_compat", version.ref = "fileManagerThumbnailWpsCompat" } oplus-filemanager-simulateClickEngine = { module = "com.oplus.filemanager:simulate_click_engine", version.ref = "fileManagerSimulateClick" } oplus-filemanager-dragDrop = { module = "com.oplus.filemanager:dragdrop", version.ref = "fileManagerDragDrop" } max-applovin-sdk = { module = "com.applovin:applovin-sdk", version.ref = "maxVersion" } mediation-google-adapter = { module = "com.applovin.mediation:google-adapter", version.ref = "googleAdapter" } mediation-facebook-adapter = { module = "com.applovin.mediation:facebook-adapter", version.ref = "facebookAdapter" } mediation-mytarget-adapter = { module = "com.applovin.mediation:mytarget-adapter", version.ref = "mytargetAdapter" } mediation-bytedance-adapter = { module = "com.applovin.mediation:bytedance-adapter", version.ref = "bytedanceAdapter" } ######## Unit test denpendencies ######## junit-base = { module = "junit:junit", version.ref = "junit" } mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockito" } mockk-base = { module = "io.mockk:mockk", version.ref = "mockk" } mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" } mockk-agnet = { module = "io.mockk:mockk-agent-jvm", version.ref = "mockk" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinCoroutinesTest" } robolectric-base = { module = "org.robolectric:robolectric", version.ref = "robolectric" } powermock-module-junit4-base = { module = "org.powermock:powermock-module-junit4", version.ref = "powermock" } powermock-module-junit4-rule = { module = "org.powermock:powermock-module-junit4-rule", version.ref = "powermock" } powermock-api-mockito2 = { module = "org.powermock:powermock-api-mockito2", version.ref = "powermock" } powermock-classloading-xstream = { module = "org.powermock:powermock-classloading-xstream", version.ref = "powermock" } androidx-arch-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "androidxCoreTest" } json-base = { module = "org.json:json", version.ref = "json" } ######## AndroidTest denpendencies ######## androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } androidx-test-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espresso" } androidx-test-espresso-web = { module = "androidx.test.espresso:espresso-web", version.ref = "espresso" } androidx-test-espresso-idling-concurrent = { module = "androidx.test.espresso.idling:idling-concurrent", version.ref = "espresso" } androidx-test-espresso-idling-resource = { module = "androidx.test.espresso:espresso-idling-resource", version.ref = "espresso" } androidx-test-runner = { module = "androidx.test:runner", version.ref = "testRunner" } androidx-test-rules = { module = "androidx.test:rules", version.ref = "testRules" } androidx-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidxJunit" } androidx-test-truth = { module = "androidx.test.ext:truth", version.ref = "testTruth" } androidx-test-uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiautomator" } androidx-room-testing = { module = "androidx.room:room-testing", version.ref = "roomTesting" } mockito-android = { module = "org.mockito:mockito-android", version.ref = "mockito" } otest-testLib = { module = "otestPlatform:testLib", version.ref = "oTestLib" } otest-coverageLib = { module = "otestPlatform:coverageLibTest", version.ref = "oTestCoverage" } koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin" } koin-test-junit4 = { module = "io.insert-koin:koin-test-junit4", version.ref = "koin" } seedling-sdk = { module = "com.oplus.pantanal.card:seedling-support-internal", version.ref = "koin" } [bundles] ######## Codes denpendencies ######## kotlin = ["kotlin-stdlib-common", "kotlin-stdlib-jdk8", "kotlinx-coroutines-android"] oplus-cloudconfig = ["oplus-cloudconfig-base", "oplus-cloudconfig-env"] oplus-feedback-domestic = ["oplus-feedback-cdp", "oplus-feedback-env-domestic"] heytap-cloudconfig = ["heytap-cloudconfig-base", "heytap-cloudconfig-env", "heytap-cloudconfig-area"] heytap-clouddrive = ["heytap-cloud-drive", "heytap-cloud-base"] squareup-okhttp3 = ["squareup-okhttp3-okhttp", "squareup-okhttp3-logging"] squareup-retrofit2 = [ "squareup-retrofit2-retrofit", "squareup-retrofit2-gson", "squareup-retrofit2-adapter", "rxjava" ] ######## Unit test denpendencies ######## test-mockito = ["mockito-core", "mockito-inline"] test-mockk = ["mockk-base", "mockk-android", "mockk-agnet"] test-powermock = [ "powermock-module-junit4-base", "powermock-module-junit4-rule", "powermock-api-mockito2", "powermock-classloading-xstream" ] ######## AndroidTest denpendencies ######## android-test-suit = [ "androidx-test-runner", "androidx-test-rules", "androidx-test-junit", "androidx-test-truth" ] android-test-espresso = [ "androidx-test-espresso-core", "androidx-test-espresso-intents", "androidx-test-espresso-web", "androidx-test-espresso-idling-concurrent", "androidx-test-espresso-idling-resource" ]AGP升到8.3.1要修改哪些东西
07-19
<think>我们正在将AGP从8.2.2升级到8.3.1。根据提供的版本目录(Version Catalog)文件,我们需要修改以下内容: 1. **更新AGP版本**:将`androidGradlePlugin`的值从`8.2.2`改为`8.3.1`。 2. **更新Gradle版本**:AGP 8.3.1要求Gradle版本为8.4,因此需要更新`gradle-wrapper.properties`中的Gradle版本。 3. **检查其他依赖的兼容性**:特别是Kotlin版本,因为AGP 8.3.1要求Kotlin版本至少为1.9.20(我们当前是1.9.22,符合要求)。但需要确保其他依赖库与新AGP兼容。 ### 具体修改步骤: #### 1. 修改AGP版本 在版本目录文件(通常是`libs.versions.toml`)中,找到`androidGradlePlugin`并更新: ```toml [versions] androidGradlePlugin = "8.3.1" # 修改此行 ``` #### 2. 更新Gradle版本 修改`gradle-wrapper.properties`文件中的分发URL: ```properties distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip # 注意:AGP 8.3.1要求Gradle版本为8.4,但8.7是兼容的(因为8.4<=8.7)。官方要求是8.4,但使用8.7更佳。 ``` #### 3. 检查其他依赖 - **Kotlin版本**:当前为1.9.22,满足AGP 8.3.1的要求(>=1.9.20),无需修改。 - **其他依赖**:需要检查是否有库与新AGP不兼容。特别是: - 与Android SDK Build Tools相关的库(如`androidToolsR8`当前为8.2.42,AGP 8.3.1自带R8版本,通常无需单独指定,可考虑移除)。 - 其他插件(如`oapm`、`obuild`等)需要确认是否兼容AGP 8.3.1。 #### 4. 移除已弃用的配置 AGP 8.3.1可能弃用了一些配置,需要检查: - 移除`compile`、`api`等已弃用配置(应使用`implementation`、`api`等)。 - 检查`build.gradle`文件中是否有使用`flavorDimensions`、`productFlavors`等旧写法,更新为新语法。 #### 5. 更新模块的`build.gradle`文件 确保所有模块的`build.gradle`文件中使用的插件版本与版本目录一致。例如: ```groovy plugins { id 'com.android.application' version '8.3.1' apply false id 'com.android.library' version '8.3.1' apply false id 'org.jetbrains.kotlin.android' version '1.9.22' apply false } ``` ### 注意事项: - **升级后同步**:执行Gradle同步(Sync Project)。 - **构建扫描**:建议使用`--scan`选项构建以诊断问题。 - **测试**:运行单元测试和UI测试,确保功能正常。 ### 常见问题处理: - **问题:`Unsupported class file major version 65`**:升级Java版本(AGP 8.3.1需要JDK17)。 - **问题:`Namespace not specified`**:在模块的`build.gradle`中设置`namespace`属性(AGP 8.0+要求)。 §§相关问题§§ 1. 升级AGP到8.3.1后出现"Namespace not specified"错误,如何解决? 2. 如何验证项目中所有第三方插件与AGP 8.3.1的兼容性? 3. 升级AGP后构建速度变慢,有哪些优化建议? 4. 如果升级后遇到R8混淆问题,应该如何排查和修复? 5. 在AGP 8.3.1中,如何配置新的构建功能(如模块化构建)?</think>根据您提供的 `libs.versions.toml` 文件内容,将 AGP 从 8.2.2 升级到 8.3.1 需要修改以下关键部分: ### 需要修改的内容: 1. **AGP 版本号** 在 `[versions]` 块中更新: ```toml androidGradlePlugin = "8.3.1" # 原值 "8.2.2" ``` 2. **Gradle 版本兼容性** 在 `gradle-wrapper.properties` 中更新(与 AGP 8.3.1 兼容): ```properties distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip ``` 3. **Kotlin 版本验证** 确认当前 Kotlin 版本 `kotlin = "1.9.22"` 与 AGP 8.3.1 兼容(官方要求 ≥1.9.20) 4. **依赖库兼容性检查** 重点检查以下易冲突库: ```toml # 需要验证的库 room = "2.4.3" → 建议升级到 2.6.1 workmanagerversion = "2.7.0" → 建议升级到 2.9.0 okhttp3 = "4.12.0" → 建议升级到 4.12.0+ ``` ### 完整修改步骤: 1. **修改 versions.toml** ```diff [versions] - androidGradlePlugin = "8.2.2" + androidGradlePlugin = "8.3.1" ``` 2. **更新项目级 build.gradle** 确保插件版本引用正确: ```groovy // 项目级 build.gradle plugins { id 'com.android.application' version libs.versions.android.gradle.plugin apply false id 'com.android.library' version libs.versions.android.gradle.plugin apply false } ``` 3. **解决常见兼容性问题** - 若出现 **`Namespace not specified`** 错误: ```groovy // 模块级 build.gradle android { namespace 'com.your.package' // 添加此配置 } ``` - 若出现 **`Unsupported Java`** 错误: ```groovy android { compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } } ``` 4. **清理构建缓存** 升级后执行: ```bash ./gradlew clean ./gradlew --stop rm -rf ~/.gradle/caches ``` ### 验证清单: 1. 同步后检查 `File > Project Structure > Project` 显示: - Android Gradle Plugin Version: 8.3.1 - Gradle Version: 8.7 2. 运行 `./gradlew build --scan` 生成构建扫描报告 3. 重点测试涉及的功能模块: - 多模块构建 - 资源合并(特别是带 `$` 的资源) - 代码混淆(R8 规则)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值