此configuration已完成,但在执行命令期间:
./gradlew :app:firebaseUploadReleaseProguardMapping
发生错误:
配置'编译'在项目':app'已弃用。使用 '实施'代替。 registerResGeneratingTask已弃用,请使用 registerGeneratedFolders(FileCollection)registerResGeneratingTask是 不推荐使用,使用registerGeneratedFolders(FileCollection) registerResGeneratingTask已弃用,请使用 registerGeneratedFolders(FileCollection)registerResGeneratingTask是 不推荐使用,使用registerGeneratedFolders(FileCollection) registerResGeneratingTask已弃用,请使用 registerGeneratedFolders(FileCollection)registerResGeneratingTask是 不推荐使用,使用registerGeneratedFolders(FileCollection) registerResGeneratingTask已弃用,请使用 registerGeneratedFolders(FileCollection)registerResGeneratingTask是 不推荐使用,请使用registerGeneratedFolders(FileCollection)
- 异常是:org.gradle.api.tasks.TaskExecutionException:任务':app:firebaseUploadPrdReleaseProguardMapping'执行失败。 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) 在org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) 在org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) 在org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) 在org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60) 在org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97) 在org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87) 在org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) 在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) 在org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 在org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) 在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker $ 1.run(DefaultTaskGraphExecuter.java:248) 在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) 在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) 在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker.access $ 200(DefaultTaskPlanExecutor.java:79) 在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker $ 1.execute(DefaultTaskPlanExecutor.java:104) 在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker $ 1.execute(DefaultTaskPlanExecutor.java:98) 在org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581) 在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) at org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) 引起:org.gradle.api.GradleException:无法上传映射 文件。 在com.google.firebase.crash.plugin.NetworkConnectionProvider.getSignedUrlKey(NetworkConnectionProvider.java:44) 在com.google.firebase.crash.plugin.SingleVersionMappingFileUploader.uploadMappingFile(SingleVersionMappingFileUploader.java:49) 在com.google.firebase.crash.plugin.MultiVersionMappingFileUploader.upload(MultiVersionMappingFileUploader.java:22) 在com.google.firebase.crash.plugin.UploadProguardMappingTask.uploadMappingFile(UploadProguardMappingTask.java:197) 在com.google.firebase.crash.plugin.UploadProguardMappingTask.parseGoogleServicesFile(UploadProguardMappingTask.java:181) 在com.google.firebase.crash.plugin.UploadProguardMappingTask.action(UploadProguardMappingTask.java:104) 在org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) 在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:784) 在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:751) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ 1.run(ExecuteActionsTaskExecuter.java:121) 在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) ... 29更多引起:java.io.IOException:从流中读取凭据时出错,'键入'字段未指定。 在com.google.api.client.googleapis.auth.oauth2.GoogleCredential.fromStream(GoogleCredential.java:254) 在com.google.api.client.googleapis.auth.oauth2.GoogleCredential.fromStream(GoogleCredential.java:226) 在com.google.firebase.crash.plugin.NetworkConnectionProvider.newHttpRequestFactory(NetworkConnectionProvider.java:87) 在com.google.firebase.crash.plugin.NetworkConnectionProvider.getSignedUrlKey(NetworkConnectionProvider.java:39) ... 47更多
google-services.json的路径是在gradle.properties中配置的,我有安装Java 8,因为这是error。
答案 0 :(得分:0)
从Error reading credentials from stream, 'type' field not specified
错误判断,您的服务帐户文件似乎有问题:
确保您已创建服务帐户/私钥,已下载关联服务帐户文件并使用FirebaseServiceAccountFilePath
属性指向该文件(根据firebase.google.com/docs/crash/android)
以下是有关设置该属性的更多信息Uploading ProGuard Mapping Files to Firebase