web-dev-qa-db-ja.com

Android:タスク ':app:packageDebug'の実行に失敗しました。 >データ

サンプルプロジェクトを作成したばかりで、この問題に直面しています。誰かがこれを解決するためにこれを助けることができますか?

* What went wrong:
Execution failed for task ':app:packageDebug'.
> data        

* Try:        
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:packageDebug'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.Java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.Java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.Java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.Java:64)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.Java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.Java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.Java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.Java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.Java:43)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:203)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:185)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.Java:62)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.Java:50)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.Java:25)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.Java:110)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.Java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.Java:37)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.Java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.Java:43)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.Java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.Java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.Java:30)
        at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.Java:154)
        at org.gradle.internal.Factories$1.create(Factories.Java:22)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:52)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.Java:151)
        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.Java:32)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.Java:99)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.Java:93)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:62)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.Java:93)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.Java:82)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.Java:94)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.Java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.Java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.Java:43)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.Java:28)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.Java:77)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.Java:47)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.Java:51)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.Java:28)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.Java:43)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.Java:170)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.Java:237)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.Java:210)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.Java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.Java:24)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.Java:206)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.Java:169)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.Java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.Java:22)
        at org.gradle.launcher.Main.doAction(Main.Java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.Java:45)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.Java:54)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.Java:35)
        at org.gradle.launcher.GradleMain.main(GradleMain.Java:23)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.Java:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.Java:129)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.Java:61)
Caused by: Java.lang.NoSuchFieldError: data
        at org.bouncycastle.cms.CMSProcessableByteArray.<init>(Unknown Source)
        at com.Android.builder.signing.SignedJarBuilder.close(SignedJarBuilder.Java:336)
        at com.Android.builder.internal.packaging.Packager.sealApk(Packager.Java:512)
        at com.Android.builder.core.AndroidBuilder.packageApk(AndroidBuilder.Java:1863)
        at com.Android.build.gradle.tasks.PackageApplication.doFullTaskAction(PackageApplication.Java:180)
        at com.Android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.Java:98)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.Java:75)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.Java:244)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.Java:220)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.Java:231)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.Java:209)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.Java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.Java:61)
        ... 60 more
8
Ramesh Akula

Android studioを閉じた後、apk\app\build\outputs\apk\app-debug.apk 'を手動で削除してみてください。しばらくするとエラーが再び発生する可能性がありますが、可能です。そうすることであなたの仕事を続けてください。

16
Muhammad Jasim

ここでの回答は多くの人を助けましたが、私の問題はdebug.keystoreが何らかの理由で破損していることでした。最初にdebug.keystoreディレクトリ内の\appを削除し、以下のコマンドでdebug.keystoreを再生成する必要がありました。必ずappディレクトリ内で実行してください。

keytool -genkey -v -keystore debug.keystore -storepass Android -alias androiddebugkey -keypass Android -keyalg RSA -keysize 2048 -validity 10000
0
Jay Mayu

「ビルド」の下の「プロジェクトのクリーンアップ」をクリックするだけで完了です。

0
H A Tanim