错误描述:
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:packageDebug’.
1 exception was raised by workers:
java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store “C:\Users\lenovo.android\debug.keystore”: Invalid keystore format
-
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:app:packageDebug’.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:95)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:119)
at org.gradle.api.internal.tasks.execution.ResolvePreviousStateExecuter.execute(ResolvePreviousStateExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:94)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:56)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:67)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter 1. c a l l ( E v e n t F i r i n g T a s k E x e c u t e r . j a v a : 49 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r 1.call(EventFiringTaskExecuter.java:49) at org.gradle.internal.operations.DefaultBuildOperationExecutor 1.call(EventFiringTaskExecuter.java:49)atorg.gradle.internal.operations.DefaultBuildOperationExecutorCallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
at org.gradle.internal.operations.DefaultBuildOperationExecutor C a l l a b l e B u i l d O p e r a t i o n W o r k e r . e x e c u t e ( D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . j a v a : 305 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . e x e c u t e ( D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . j a v a : 175 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . c a l l ( D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . j a v a : 101 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e l e g a t i n g B u i l d O p e r a t i o n E x e c u t o r . c a l l ( D e l e g a t i n g B u i l d O p e r a t i o n E x e c u t o r . j a v a : 36 ) a t o r g . g r a d l e . a p i . i n t e r n a l . t a s k s . e x e c u t i o n . E v e n t F i r i n g T a s k E x e c u t e r . e x e c u t e ( E v e n t F i r i n g T a s k E x e c u t e r . j a v a : 49 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . L o c a l T a s k N o d e E x e c u t o r . e x e c u t e ( L o c a l T a s k N o d e E x e c u t o r . j a v a : 43 ) a t o r g . g r a d l e . e x e c u t i o n . t a s k g r a p h . D e f a u l t T a s k E x e c u t i o n G r a p h CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)atorg.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)atorg.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)atorg.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)atorg.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)atorg.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)atorg.gradle.execution.taskgraph.DefaultTaskExecutionGraphInvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph I n v o k e N o d e E x e c u t o r s A c t i o n . e x e c u t e ( D e f a u l t T a s k E x e c u t i o n G r a p h . j a v a : 343 ) a t o r g . g r a d l e . e x e c u t i o n . t a s k g r a p h . D e f a u l t T a s k E x e c u t i o n G r a p h InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)atorg.gradle.execution.taskgraph.DefaultTaskExecutionGraphBuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph B u i l d O p e r a t i o n A w a r e E x e c u t i o n A c t i o n . e x e c u t e ( D e f a u l t T a s k E x e c u t i o n G r a p h . j a v a : 322 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322) at org.gradle.execution.plan.DefaultPlanExecutor BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker 1. e x e c u t e ( D e f a u l t P l a n E x e c u t o r . j a v a : 134 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r 1.execute(DefaultPlanExecutor.java:134) at org.gradle.execution.plan.DefaultPlanExecutor 1.execute(DefaultPlanExecutor.java:134)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker 1. e x e c u t e ( D e f a u l t P l a n E x e c u t o r . j a v a : 129 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r 1.execute(DefaultPlanExecutor.java:129) at org.gradle.execution.plan.DefaultPlanExecutor 1.execute(DefaultPlanExecutor.java:129)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker.execute(DefaultPlanExecutor.java:202)
at org.gradle.execution.plan.DefaultPlanExecutor E x e c u t o r W o r k e r . e x e c u t e N e x t N o d e ( D e f a u l t P l a n E x e c u t o r . j a v a : 193 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193) at org.gradle.execution.plan.DefaultPlanExecutor ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker.run(DefaultPlanExecutor.java:129)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl 1. r u n ( M a n a g e d E x e c u t o r I m p l . j a v a : 46 ) a t o r g . g r a d l e . i n t e r n a l . c o n c u r r e n t . T h r e a d F a c t o r y I m p l 1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl 1.run(ManagedExecutorImpl.java:46)atorg.gradle.internal.concurrent.ThreadFactoryImplManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.tooling.BuildException: 1 exception was raised by workers:
java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store “C:\Users\lenovo.android\debug.keystore”: Invalid keystore formatat com.android.build.gradle.internal.scope.BuildElements W o r k e r s B a s e d S c h e d u l e r WorkersBasedScheduler WorkersBasedSchedulertransform 2. c a l l ( B u i l d E l e m e n t s . k t : 229 ) a t c o m . a n d r o i d . b u i l d . g r a d l e . i n t e r n a l . s c o p e . B u i l d E l e m e n t s 2.call(BuildElements.kt:229) at com.android.build.gradle.internal.scope.BuildElements 2.call(BuildElements.kt:229)atcom.android.build.gradle.internal.scope.BuildElementsWorkersBasedScheduler$transform 2. c a l l ( B u i l d E l e m e n t s . k t : 193 ) a t c o m . a n d r o i d . b u i l d . g r a d l e . i n t e r n a l . s c o p e . B u i l d E l e m e n t s 2.call(BuildElements.kt:193) at com.android.build.gradle.internal.scope.BuildElements 2.call(BuildElements.kt:193)atcom.android.build.gradle.internal.scope.BuildElementsWorkersBasedScheduler.into(BuildElements.kt:202)
at com.android.build.gradle.internal.scope.BuildElementActionScheduler.into(BuildElementActionScheduler.kt:37)
at com.android.build.gradle.tasks.PackageAndroidArtifact.doFullTaskAction(PackageAndroidArtifact.java:428)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:47)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter 2. r u n ( E x e c u t e A c t i o n s T a s k E x e c u t e r . j a v a : 284 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r 2.run(ExecuteActionsTaskExecuter.java:284) at org.gradle.internal.operations.DefaultBuildOperationExecutor 2.run(ExecuteActionsTaskExecuter.java:284)atorg.gradle.internal.operations.DefaultBuildOperationExecutorRunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:273)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:258)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access 200 ( E x e c u t e A c t i o n s T a s k E x e c u t e r . j a v a : 67 ) a t o r g . g r a d l e . a p i . i n t e r n a l . t a s k s . e x e c u t i o n . E x e c u t e A c t i o n s T a s k E x e c u t e r 200(ExecuteActionsTaskExecuter.java:67) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter 200(ExecuteActionsTaskExecuter.java:67)atorg.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuterTaskExecution.execute(ExecuteActionsTaskExecuter.java:145)
at org.gradle.internal.execution.impl.steps.ExecuteStep.execute(ExecuteStep.java:49)
at org.gradle.internal.execution.impl.steps.CancelExecutionStep.execute(CancelExecutionStep.java:34)
at org.gradle.internal.execution.impl.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:69)
at org.gradle.internal.execution.impl.steps.TimeoutStep.execute(TimeoutStep.java:49)
at org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:33)
at org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:43)
at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:29)
at org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:134)
at org.gradle.internal.execution.impl.steps.CacheStep.lambda$execute 3 ( C a c h e S t e p . j a v a : 83 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . i m p l . s t e p s . C a c h e S t e p . e x e c u t e ( C a c h e S t e p . j a v a : 82 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . i m p l . s t e p s . C a c h e S t e p . e x e c u t e ( C a c h e S t e p . j a v a : 36 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . i m p l . s t e p s . P r e p a r e C a c h i n g S t e p . e x e c u t e ( P r e p a r e C a c h i n g S t e p . j a v a : 33 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . i m p l . s t e p s . S t o r e S n a p s h o t s S t e p . e x e c u t e ( S t o r e S n a p s h o t s S t e p . j a v a : 38 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . i m p l . s t e p s . S t o r e S n a p s h o t s S t e p . e x e c u t e ( S t o r e S n a p s h o t s S t e p . j a v a : 23 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . i m p l . s t e p s . S k i p U p T o D a t e S t e p . e x e c u t e B e c a u s e ( S k i p U p T o D a t e S t e p . j a v a : 96 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . i m p l . s t e p s . S k i p U p T o D a t e S t e p . l a m b d a 3(CacheStep.java:83) at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82) at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:36) at org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33) at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38) at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23) at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96) at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda 3(CacheStep.java:83)atorg.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82)atorg.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:36)atorg.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33)atorg.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38)atorg.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23)atorg.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)atorg.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambdaexecute$0(SkipUpToDateStep.java:89)
at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:91)
… 32 more
Caused by: com.android.ide.common.workers.WorkerExecutorException: 1 exception was raised by workers:
java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store “C:\Users\lenovo.android\debug.keystore”: Invalid keystore formatat com.android.ide.common.workers.ExecutorServiceAdapter.await(ExecutorServiceAdapter.kt:62)
at com.android.build.gradle.internal.scope.BuildElements W o r k e r s B a s e d S c h e d u l e r WorkersBasedScheduler WorkersBasedSchedulertransform$2.call(BuildElements.kt:227)
… 72 more
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store “C:\Users\lenovo.android\debug.keystore”: Invalid keystore format
at com.android.ide.common.workers.ExecutorServiceAdapter.await(ExecutorServiceAdapter.kt:56)
… 73 more
Caused by: java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store “C:\Users\lenovo.android\debug.keystore”: Invalid keystore format
at com.android.build.gradle.internal.packaging.IncrementalPackagerBuilder.withSigning(IncrementalPackagerBuilder.java:231)
at com.android.build.gradle.tasks.PackageAndroidArtifact.doTask(PackageAndroidArtifact.java:789)
at com.android.build.gradle.tasks.PackageAndroidArtifact.access 100 ( P a c k a g e A n d r o i d A r t i f a c t . j a v a : 115 ) a t c o m . a n d r o i d . b u i l d . g r a d l e . t a s k s . P a c k a g e A n d r o i d A r t i f a c t 100(PackageAndroidArtifact.java:115) at com.android.build.gradle.tasks.PackageAndroidArtifact 100(PackageAndroidArtifact.java:115)atcom.android.build.gradle.tasks.PackageAndroidArtifactFullActionSplitterRunnable.run(PackageAndroidArtifact.java:554)
at com.android.ide.common.workers.ExecutorServiceAdapter s u b m i t submit submitsubmission$1.run(ExecutorServiceAdapter.kt:40)
… 74 more
Caused by: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store “C:\Users\lenovo.android\debug.keystore”: Invalid keystore format
at com.android.ide.common.signing.KeystoreHelper.getCertificateInfo(KeystoreHelper.java:212)
at com.android.build.gradle.internal.packaging.IncrementalPackagerBuilder.withSigning(IncrementalPackagerBuilder.java:210)
… 78 more
Caused by: java.io.IOException: Invalid keystore format
at com.android.ide.common.signing.KeystoreHelper.getCertificateInfo(KeystoreHelper.java:190)
… 79 more -
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
25 actionable tasks: 1 executed, 24 up-to-date
解决方案:
1、修改jdk版本 解决 亲测可用
2、找到指定目录下的 debug文件 直接删除 重启 解决
来源地址:https://blog.csdn.net/qq_21399461/article/details/129258281