无法下载 SHA1 和 SHA-256 的签名报告

Unable to download signingReport for SHA1 and SHA-256

我不得不更改 Android Studio App 的项目名称,但由于此 Phone 验证停止工作。因为这是要求 SHA1 和 SHA-256 哈希密钥,当我从 Gradle 面板找到 SigningReport 时它显示错误。

顺便说一句,应用程序安装工作正常。其他登录机制运行良好,例如:自定义电子邮件登录、Google 登录、Facebook 登录。

我需要知道哪里出了问题?

我使用这些步骤更改了此站点上提到的项目名称:https://www.geeksforgeeks.org/different-ways-to-change-the-project-name-in-android-studio/

错误信息:

D:\PK\New folder\Trail\My APP>gradlew signingReport 启动一个 Gradle 守护进程,1 个不兼容和 3 个停止的守护进程无法重用,使用 --status 获取详细信息 配置缓存是一项孵化功能。 正在计算任务图,因为没有配置缓存可用于任务:signingReport

在存储配置缓存时发现了 115 个问题,其中 4 个似乎是独一无二的。

在 file:///D:/PK/New%20folder/Trail/Exam%20String/build/reports/configuration-cache/ab9kk6ntb87qv1nszinvkztgv/configuration-cache-report.html

查看完整报告

失败:构建失败,出现异常。

Configuration cache state could not be cached: field 'elements' from type 'com.google.common.collect.ImmutableList$SerializedForm': error writing value of type '[Ljava.lang.Object;' Configuration cache state could not be cached: field 'androidTest' from type 'com.android.build.api.variant.impl.ApplicationVariantImpl': error writing value of type 'com.android.build.ap i.component.impl.AndroidTestImpl' > Configuration cache state could not be cached: field 'delegate$delegate' from type 'com.android.build.api.component.impl.AndroidTestImpl': error writing value of type 'kotlin.Synchroni zedLazyImpl' > Configuration cache state could not be cached: field 'value' from type 'kotlin.InitializedLazyImpl': error writing value of type 'com.android.build.api.component.impl.AndroidTestCre ationConfigImpl' > Configuration cache state could not be cached: field 'globalScope' from type 'com.android.build.api.component.impl.AndroidTestCreationConfigImpl': error writing value of type 'co m.android.build.gradle.internal.scope.GlobalScope' > Configuration cache state could not be cached: field 'extension' from type 'com.android.build.gradle.internal.scope.GlobalScope': error writing value of type 'com.android.buil d.gradle.internal.dsl.BaseAppModuleExtension' > Configuration cache state could not be cached: field 'applicationVariants' from type 'com.android.build.gradle.internal.dsl.BaseAppModuleExtension': error writing value of type 'org.gradle.api.internal.DefaultDomainObjectSet' > Configuration cache state could not be cached: field 'store' from type 'org.gradle.api.internal.DefaultDomainObjectSet': error writing value of type 'org.gradle.api.inte rnal.collections.IterationOrderRetainingSetElementSource' > Configuration cache state could not be cached: field 'inserted' from type 'org.gradle.api.internal.collections.IterationOrderRetainingSetElementSource': error writing value of type 'java.util.ArrayList' > Configuration cache state could not be cached: field 'cache' from type 'org.gradle.api.internal.collections.AbstractIterationOrderRetainingElementSource$Element': error writing value of type 'java.util.ArrayList' > Configuration cache state could not be cached: field 'testVariant' from type 'com.android.build.gradle.internal.api.ApplicationVariantImpl': error writing value of type 'com.android.build.gradle.internal.api.TestVariantImpl' > Configuration cache state could not be cached: field 'variantData' from type 'com.android.build.gradle.internal.api.TestVariantImpl': error writing value of type 'com.android.build.gradle.internal.variant.TestVariantData' > Configuration cache state could not be cached: field 'testedVariantData' from type 'com.android.build.gradle.internal.variant.TestVariantData': error writ ing value of type 'com.android.build.gradle.internal.variant.ApplicationVariantData' > Configuration cache state could not be cached: field 'artifacts' from type 'com.android.build.gradle.internal.variant.ApplicationVariantData': error wr iting value of type 'com.android.build.api.artifact.impl.ArtifactsImpl' > Configuration cache state could not be cached: field 'storageProvider' from type 'com.android.build.api.artifact.impl.ArtifactsImpl': error writing value of type 'com.android.build.api.artifact.impl.StorageProviderImpl' > Configuration cache state could not be cached: field 'directory' from type 'com.android.build.api.artifact.impl.StorageProviderImpl': error writi ng value of type 'com.android.build.api.artifact.impl.TypedStorageProvider' > Configuration cache state could not be cached: field 'singleStorage' from type 'com.android.build.api.artifact.impl.TypedStorageProvider': err or writing value of type 'java.util.LinkedHashMap' > java.util.ConcurrentModificationException (no error message)

此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 8.0 不兼容。 使用“--warning-mode all”来显示各个弃用警告。 参见 https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings

12 秒内构建失败 配置缓存条目已丢弃,出现 115 个问题。

已找到答案,它的发生是由于

org.gradle.unsafe.configuration-缓存=真

获取 SHA 哈希密钥必须为 false。

为了加快构建过程,它需要为真。

它也可以在一个 gradle.properties 文件中永久启用,您可以签入源代码管理: