gpt4 book ai didi

android - APK 包中的 .properties 文件的用途是什么?

转载 作者:行者123 更新时间:2023-11-29 22:42:51 27 4
gpt4 key购买 nike

在分析 APK 时,我发现存档的根目录中有很多 .properties 文件,指示 Google Play 服务、Firebase 和 Google HTTP 客户端的版本号,例如:

version=19.2.0
client=firebase-database
firebase-database_client=19.2.0

这些理论上可以从包中排除:

android {
packagingOptions {
exclude "firebase-*.properties"
exclude "play-services-*.properties"
exclude "google-http-client.version"
}
}

然而,这 issue表明这将是“预期行为”。那么从包中排除这些看似无用的文件是否安全——或者 Google Play 是否需要它们,以便将这些版本号暴露给自动包内容扫描?这些版本号文件的用途是否记录在某处?


这是我正在谈论的内容的屏幕截图:

Analyze APK screenshot

最佳答案

文档中回答问题的部分当时可能不存在:


来源:Dependency information for Play Console :

When building your app using AGP 4.0.0 and higher, the plugin includes metadata that describes the library dependencies that are compiled into your app. When uploading your app, the Play Console inspects this metadata to provide alerts for known issues with SDKs and dependencies your app uses, and, in some cases, provide actionable feedback to resolve those issues.

The data is compressed, encrypted by a Google Play signing key, and stored in the signing block of your release app. We recommend keeping this dependencies file for a safe and positive user experience. However, if you’d rather not share this information, you can opt out by including the following dependenciesInfo block in your module’s build.gradle file.

android {
dependenciesInfo {

// Disables dependency metadata when building APKs.
includeInApk = false

// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}
}

关于android - APK 包中的 .properties 文件的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58811165/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com