gradle项目build时一直提示the trustAnchors parameter must be non-empty

在使用阿里云镜像进行gradle项目编译时遇到HTTPS问题,抛出异常java.security.InvalidAlgorithmParameterException。该问题可通过切换JDK版本来解决,异常表明证书信任链存在问题。
plugins { id 'eclipse' id 'idea' id 'net.minecraftforge.gradle' version '5.1.+' apply false id 'java' } apply plugin: "java" group = mod_group_id version = mod_version base { archivesName = mod_id } java { toolchain.languageVersion = JavaLanguageVersion.of(21) } minecraft { // The mappings can be changed at any time and must be in the following format. // Channel: Version: // official MCVersion Official field/method names from Mojang mapping files // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official // // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md // // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge // Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: mapping_channel, version: mapping_version // Tell FG to not automatically create the reobf tasks, as we now use Official mappings at runtime, If you don't use them at dev time then you'll have to fix your reobf yourself. reobf = false // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game. // In most cases, it is not necessary to enable. // enableEclipsePrepareRuns = true // enableIdeaPrepareRuns = true // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. // It is REQUIRED to be set to true for this template to function. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html copyIdeResources = true // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. // The folder name can be set on a run configuration using the "folderName" property. // By default, the folder name of a run configuration is the name of the Gradle project containing it. // generateRunFolders = true // This property enables access transformers for use in development. // They will be applied to the Minecraft artifact. // The access transformer file can be anywhere in the project. // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge. // This default location is a best practice to automatically put the file in the right place in the final jar. // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { // applies to all the run configs below configureEach { workingDirectory project.file('run') // Recommended logging data for a userdev environment // The markers can be added/remove as needed separated by commas. // "SCAN": For mods scan. // "REGISTRIES": For firing of registry events. // "REGISTRYDUMP": For getting the contents of all registries. property 'forge.logging.markers', 'REGISTRIES' // Recommended logging level for the console // You can set various levels here. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } // This run config launches GameTestServer and runs all registered gametests, then exits. // By default, the server will crash when no gametests are provided. // The gametest system is also enabled by default for other run configs under the /test command. gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { // example of overriding the workingDirectory set in configureEach above workingDirectory project.file('run-data') // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } // Include resources generated by data generators. sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { // Put repositories for dependencies here // ForgeGradle automatically adds the Forge maven and Maven Central for you // If you have mod jar dependencies in ./libs, you can declare them as a repository like so. // See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver // flatDir { // dir 'libs' // } } dependencies { // Specify the version of Minecraft to use. // Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact. // The "userdev" classifier will be requested and setup by ForgeGradle. // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}") // Example mod dependency using a mod jar from ./libs with a flat dir repository // This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar // The group id is ignored when searching -- in this case, it is "blank" // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") // For more info: // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html // Hack fix for now, force jopt-simple to be exactly 5.0.4 because Mojang ships that version, but some transtive dependencies request 6.0+ implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } } } // This block of code expands all declared replace properties in the specified resource targets. // A missing property will result in an error. Properties are expanded using ${} Groovy notation. // When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html tasks.named('processResources', ProcessResources).configure { var replaceProperties = [minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range, forge_version : forge_version, forge_version_range: forge_version_range, loader_version_range: loader_version_range, mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version, mod_authors : mod_authors, mod_description: mod_description,] inputs.properties replaceProperties filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { expand replaceProperties + [project: project] } } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes(["Specification-Title" : mod_id, "Specification-Vendor" : mod_authors, "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, "Implementation-Vendor" : mod_authors, "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")]) } } tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } // Merge the resources and classes into the same directory. // This is done because java expects modules to be in a single directory. // And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem // This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later. sourceSets.each { def dir = layout.buildDirectory.dir("sourcesSets/$it.name") it.output.resourcesDir = dir it.java.destinationDirectory = dir } minecraft forge 1.21.8-58.0.10 build.gradle
08-27
build.gradle:plugins { id 'eclipse' id 'idea' id 'net.minecraftforge.gradle' version '5.1.+' apply false id 'java' } apply plugin: "java" group = mod_group_id version = mod_version base { archivesName = mod_id } java { toolchain.languageVersion = JavaLanguageVersion.of(21) } minecraft { // The mappings can be changed at any time and must be in the following format. // Channel: Version: // official MCVersion Official field/method names from Mojang mapping files // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official // // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md // // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge // Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: mapping_channel, version: mapping_version // Tell FG to not automatically create the reobf tasks, as we now use Official mappings at runtime, If you don't use them at dev time then you'll have to fix your reobf yourself. reobf = false // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game. // In most cases, it is not necessary to enable. // enableEclipsePrepareRuns = true // enableIdeaPrepareRuns = true // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. // It is REQUIRED to be set to true for this template to function. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html copyIdeResources = true // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. // The folder name can be set on a run configuration using the "folderName" property. // By default, the folder name of a run configuration is the name of the Gradle project containing it. // generateRunFolders = true // This property enables access transformers for use in development. // They will be applied to the Minecraft artifact. // The access transformer file can be anywhere in the project. // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge. // This default location is a best practice to automatically put the file in the right place in the final jar. // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { // applies to all the run configs below configureEach { workingDirectory project.file('run') // Recommended logging data for a userdev environment // The markers can be added/remove as needed separated by commas. // "SCAN": For mods scan. // "REGISTRIES": For firing of registry events. // "REGISTRYDUMP": For getting the contents of all registries. property 'forge.logging.markers', 'REGISTRIES' // Recommended logging level for the console // You can set various levels here. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } // This run config launches GameTestServer and runs all registered gametests, then exits. // By default, the server will crash when no gametests are provided. // The gametest system is also enabled by default for other run configs under the /test command. gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { // example of overriding the workingDirectory set in configureEach above workingDirectory project.file('run-data') // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } // Include resources generated by data generators. sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { // Put repositories for dependencies here // ForgeGradle automatically adds the Forge maven and Maven Central for you // If you have mod jar dependencies in ./libs, you can declare them as a repository like so. // See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver // flatDir { // dir 'libs' // } } dependencies { // Specify the version of Minecraft to use. // Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact. // The "userdev" classifier will be requested and setup by ForgeGradle. // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}") // Example mod dependency using a mod jar from ./libs with a flat dir repository // This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar // The group id is ignored when searching -- in this case, it is "blank" // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") // For more info: // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html // Hack fix for now, force jopt-simple to be exactly 5.0.4 because Mojang ships that version, but some transtive dependencies request 6.0+ implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } } } // This block of code expands all declared replace properties in the specified resource targets. // A missing property will result in an error. Properties are expanded using ${} Groovy notation. // When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html tasks.named('processResources', ProcessResources).configure { var replaceProperties = [minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range, forge_version : forge_version, forge_version_range: forge_version_range, loader_version_range: loader_version_range, mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version, mod_authors : mod_authors, mod_description: mod_description,] inputs.properties replaceProperties filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { expand replaceProperties + [project: project] } } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes(["Specification-Title" : mod_id, "Specification-Vendor" : mod_authors, "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, "Implementation-Vendor" : mod_authors, "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")]) } } tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } // Merge the resources and classes into the same directory. // This is done because java expects modules to be in a single directory. // And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem // This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later. sourceSets.each { def dir = layout.buildDirectory.dir("sourcesSets/$it.name") it.output.resourcesDir = dir it.java.destinationDirectory = dir } minecraft forge 1.21.8-52.0.10 mod
08-27
bool OatFileAssistant::ValidateBootClassPathChecksums(OatFileAssistantContext* ofa_context, 799 InstructionSet isa, 800 std::string_view oat_checksums, 801 std::string_view oat_boot_class_path, 802 /*out*/ std::string* error_msg) { 803 const std::vector<std::string>& bcp_locations = 804 ofa_context->GetRuntimeOptions().boot_class_path_locations; 805 806 if (oat_checksums.empty() || oat_boot_class_path.empty()) { 807 *error_msg = oat_checksums.empty() ? "Empty checksums" : "Empty boot class path"; 808 return false; 809 } 810 811 size_t oat_bcp_size = gc::space::ImageSpace::CheckAndCountBCPComponents( 812 oat_boot_class_path, ArrayRef<const std::string>(bcp_locations), error_msg); 813 if (oat_bcp_size == static_cast<size_t>(-1)) { 814 DCHECK(!error_msg->empty()); 815 return false; 816 } 817 DCHECK_LE(oat_bcp_size, bcp_locations.size()); 818 819 size_t bcp_index = 0; 820 size_t boot_image_index = 0; 821 bool found_d = false; 822 823 while (bcp_index < oat_bcp_size) { 824 static_assert(gc::space::ImageSpace::kImageChecksumPrefix == 'i', "Format prefix check"); 825 static_assert(gc::space::ImageSpace::kDexFileChecksumPrefix == 'd', "Format prefix check"); 826 if (oat_checksums.starts_with("i") && !found_d) { 827 const std::vector<OatFileAssistantContext::BootImageInfo>& boot_image_info_list = 828 ofa_context->GetBootImageInfoList(isa); 829 if (boot_image_index >= boot_image_info_list.size()) { 830 *error_msg = StringPrintf("Missing boot image for %s, remaining checksums: %s", 831 bcp_locations[bcp_index].c_str(), 832 std::string(oat_checksums).c_str()); 833 return false; 834 } 835 836 const OatFileAssistantContext::BootImageInfo& boot_image_info = 837 boot_image_info_list[boot_image_index]; 838 if (!ConsumePrefix(&oat_checksums, boot_image_info.checksum)) { 839 *error_msg = StringPrintf("Image checksum mismatch, expected %s to start with %s", 840 std::string(oat_checksums).c_str(), 841 boot_image_info.checksum.c_str()); 842 return false; 843 } 844 845 bcp_index += boot_image_info.component_count; 846 boot_image_index++; 847 } else if (oat_checksums.starts_with("d")) { 848 found_d = true; 849 const std::vector<std::string>* bcp_checksums = 850 ofa_context->GetBcpChecksums(bcp_index, error_msg); 851 if (bcp_checksums == nullptr) { 852 return false; 853 } 854 oat_checksums.remove_prefix(1u); 855 for (const std::string& checksum : *bcp_checksums) { 856 if (!ConsumePrefix(&oat_checksums, checksum)) { 857 *error_msg = StringPrintf( 858 "Dex checksum mismatch for bootclasspath file %s, expected %s to start with %s", 859 bcp_locations[bcp_index].c_str(), 860 std::string(oat_checksums).c_str(), 861 checksum.c_str()); 862 return false; 863 } 864 } 865 866 bcp_index++; 867 } else { 868 *error_msg = StringPrintf("Unexpected checksums, expected %s to start with %s", 869 std::string(oat_checksums).c_str(), 870 found_d ? "'d'" : "'i' or 'd'"); 871 return false; 872 } 报这个artd : GetBestInfo: odex next to the dex file (/system_ext/priv-app/OplusLauncher/oat/arm64/OplusLauncher.odex) is kOatBootImageOutOfDate with filter 'speed-profile' executable 'false': Missing boot image for /apex/com.android.adservices/javalib/framework-adservices.jar, remaining checksums: i;29/08499db2为什么
最新发布
11-15
<think> 我们正在处理一个关于Android运行(ART)的错误日志。错误信息如下: 'artd : GetBestInfo: odex next to the dex file (/system_ext/priv-app/OplusLauncher/oat/arm64/OplusLauncher.odex) is kOatBootImageOutOfDate with filter 'speed-profile' executable 'false': Missing boot image for /apex/com.android.adservices/javalib/framework-adservices.jar, remaining checksums: i;29/08499db2' 这个错误是由ART守护进程(artd)在尝试获取一个odex文件的最佳信息发生的。错误状态为`kOatBootImageOutOfDate`,原因是缺少一个boot image文件:`/apex/com.android.adservices/javalib/framework-adservices.jar`。 ### 错误原因分析 1. **Boot Image的作用**:在ART中,boot image包含了系统启动预加载的类和方法的编译代码。它通常包括核心库(如`framework.jar`)和关键APEX模块中的类。当应用运行,如果它们的dex/odex文件依赖于boot image,就需要匹配的boot image存在,否则会导致验证失败。 2. **错误原因**:错误信息明确指出缺少`/apex/com.android.adservices/javalib/framework-adservices.jar`的boot image。这意味着在生成`OplusLauncher.odex`文件,它引用了`framework-adservices.jar`中的类,并且这些类被期望在boot image中。但是,当前的boot image中没有包含这个jar文件。 3. **为什么会出现这个错误?**:可能的原因包括: - **系统更新问题**:在系统更新后,boot image可能没有重新生成,或者更新过程中部分模块的boot image生成失败。 - **模块依赖问题**:`OplusLauncher`应用(可能是Oppo的启动器)依赖于`com.android.adservices`模块(提供广告服务),但广告服务模块可能没有正确安装或更新,导致其boot image缺失。 - **编译配置问题**:在构建系统镜像,可能没有将`framework-adservices.jar`包含在boot classpath中,因此它没有被编译进boot image。 4. **具体错误信息解读**: - `odex next to the dex file`: 指的是与dex文件同目录下的odex文件(即`/system_ext/priv-app/OplusLauncher/oat/arm64/OplusLauncher.odex`)。 - `kOatBootImageOutOfDate`: 表示这个odex文件所依赖的boot image已经过(或者更具体地说,缺少所需的boot image)。 - `Missing boot image for ...`: 明确指出了缺失的boot image对应的jar文件路径。 - `remaining checksums: i;29/08499db2`:这是对缺失的boot image的校验和,用于验证。 ### 解决方法 1. **重新生成boot image**:可以尝试重新生成boot image,确保包含所有必需的模块。在Android设备上,这通常需要重新启动设备并触发boot image的重新编译。可以尝试清除`dalvik-cache`并重启: ```bash adb shell cmd package compile -f -m speed-profile com.android.adservices adb reboot ``` 注意:这需要设备有root权限或者是在调试版本上。 2. **更新或重新安装相关模块**:检查`com.android.adservices`模块是否正常。可以尝试更新或重新安装该APEX模块。 3. **检查系统完整性**:如果是系统更新后出现的问题,可能是更新不完整。尝试重新刷入完整的系统镜像。 4. **等待系统自动修复**:ART在下次设备空闲可能会尝试重新编译。可以等待一段间,或者重启设备多次,看问题是否消失。 5. **联系设备厂商**:如果上述方法无效,可能是设备厂商的系统构建问题,建议联系设备厂商获取支持。 ### 相关引用 在Android ART中,boot image的生成和验证是确保应用运行性能和安全的重要机制[^1]。当依赖的boot image缺失,系统会拒绝使用预先编译的odex文件,转而解释执行或尝试重新编译,这可能导致应用启动变慢[^2]。 [^1]: [Android ART Boot Image](https://source.android.com/devices/tech/dalvik/configure#boot_image) [^2]: [Understanding the Android Runtime (ART)](https://source.android.com/devices/tech/dalvik) §§相关问题§§ 1. 如何手动生成Android设备的boot image? 2. 什么是APEX模块?它们如何影响Android系统? 3. ART中的dex2oat工具的作用是什么? 4. 如何解决Android应用启动的性能问题? </think> 这个错误信息表明 Android 运行环境(ART)在处理 OplusLauncher 应用的优化代码遇到了问题,具体原因是缺少关键的系统组件。以下是详细分析: ### 错误原因分析 1. **Boot Image 缺失(核心问题)**: - 错误信息 `Missing boot image for /apex/com.android.adservices/javalib/framework-adservices.jar` 表明 ART 运行缺少必要的启动镜像文件 - `framework-adservices.jar` 是 Android 广告服务(AdServices)模块的核心库,属于 Android APEX 动态模块 - 当 ART 尝试优化应用,需要这些核心库的预编译版本来验证代码兼容性[^1] 2. **OAT 文件状态异常**: - `kOatBootImageOutOfDate` 表示 `/system_ext/priv-app/OplusLauncher/oat/arm64/OplusLauncher.odex` 这个优化文件依赖的启动镜像已过期 - `speed-profile` 表明系统尝试使用性能分析数据进行优化,但因依赖缺失而失败 3. **根本原因可能性**: - **系统更新不完整**:AdServices APEX 模块未正确更新或损坏 - **厂商定制问题**:OplusLauncher(Oppo 系设备专有)与 Android 原生组件存在兼容性问题 - **分区损坏**:`/apex` 或 `/system_ext` 分区数据损坏 - **跨版本兼容**:系统升级后残留旧版优化文件 ### 解决方案 1. **清除 ART 缓存**: ```bash adb shell pm art cleanup adb reboot ``` 这会强制 ART 在下次启动重新生成优化文件[^2] 2. **更新/修复 AdServices 模块**: ```bash adb shell cmd package update-adservices adb reboot ``` 3. **检查分区完整性**: ```bash adb shell df /apex adb shell ls -l /apex/com.android.adservices ``` 确认 APEX 模块完整存在(应有 20-50MB 左右) 4. **完整系统更新**: - 重新刷入完整的官方系统镜像,特别是 `adservices.apex` 和系统扩展分区 5. **临规避方案**: ```bash adb shell settings put global speed_profile_enabled 0 adb reboot ``` 禁用性能分析优化模式(可能影响应用启动速度) > **注意**:此错误通常出现在 Android 12+ 的设备上,尤其是厂商定制系统(如 ColorOS)与 Android 原生模块集成出现兼容性问题。如果问题持续,可能需要等待厂商推送系统更新修复[^3]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值