问题当以最大OS X packageDebug推出错误的Andr​​oid工作室 [英] Problems launching error in Android Studio when packageDebug at Max OS X

查看:185
本文介绍了问题当以最大OS X packageDebug推出错误的Andr​​oid工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[固定的问题] 我把一个jar文件,在特别的目录。 我删除它,我可以启动了Android Studio的应用程序。

[问题] 我使用的是Mac OS X. 之前出现的Andr​​oid工作室,我安装了常规,用摇篮GVM。 而且我用的android摇篮插件。

我从Android开发者安装Android的工作室,并尝试构建应用程序。 但是,

...

 :HelloAndroidStudio:packageDebug失败

失败:建立失败,一个例外。
 

出了什么问题: 执行失败的任务:HelloAndroidStudio:packageDebug

  

类org.bouncycastle.asn1.ASN1Primitive覆盖final方法等于(Ljava /郎/对象)。ž

尝试: 与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项运行,以获得更多的日志输出。

我的设置是错误的?

Additinal系统变量(JAVA_HOME)的设置是需要?

请帮我。

我添加下一个例外。

例外是:

  org.gradle.api.tasks.TaskExecutionException:执行失败的任务:HelloAndroidStudio:packageDebug。
    在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    在org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    在org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:35)
    在org.gradle.internal.Factories $ 1。创建(Factories.java:22)
    在org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:179)
    在org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:232)
    在org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
    在org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)
    在org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter.execute(CacheLockReleasingTaskExecuter.java:33)
    在org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:58)
    在org.gradle.api.internal.tasks.execution.ContextualisingTaskExecuter.execute(ContextualisingTaskExecuter.java:34)
    在org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter$1.run(CacheLockAcquiringTaskExecuter.java:39)
    在org.gradle.internal.Factories $ 1。创建(Factories.java:22)
    在org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
    在org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
    在org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
    在org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
    在org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter.execute(CacheLockAcquiringTaskExecuter.java:37)
    在org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
    在org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
    在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
    在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
    在org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
    在org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:282)
    在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:48)
    在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:34)
    在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:27)
    在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:89)
    在org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    在org.gradle.execution.DefaultBuildExecuter.access $ 200(DefaultBuildExecuter.java:23)
    在org.gradle.execution.DefaultBuildExecuter $ 2.proceed(DefaultBuildExecuter.java:67)
    在org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
    在org.gradle.internal.Factories $ 1。创建(Factories.java:22)
    在org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
    在org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
    在org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
    在org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
    在org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
    在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    在org.gradle.execution.DefaultBuildExecuter.access $ 200(DefaultBuildExecuter.java:23)
    在org.gradle.execution.DefaultBuildExecuter $ 2.proceed(DefaultBuildExecuter.java:67)
    在org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    在org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
    在org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
    在org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
    在org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
    在org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    在org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    在org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
    在org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    在org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    在org.gradle.api.internal.Actions $ RunnableActionAdapter.execute(Actions.java:171)
    在org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
    在org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
    在org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
    在org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    在org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    在org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    在org.gradle.launcher.Main.doAction(Main.java:48)
    在org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    在org.gradle.launcher.Main.main(Main.java:39)
    在org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    在org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    在org.gradle.launcher.GradleMain.main(GradleMain.java:26)
java.lang.VerifyError:所致。类org.bouncycastle.asn1.ASN1Primitive覆盖final方法等于(Ljava /郎/对象;)z
    在com.android.builder.internal.packaging.Packager< INIT>(Packager.java:253)
    在com.android.builder.AndroidBuilder.packageApk(AndroidBuilder.java:1022)
    在com.android.builder.AndroidBuilder $ packageApk.call(来源不明)
    在com.android.build.gradle.tasks.PackageApplication.doFullTask​​Action(PackageApplication.groovy:71)
    在com.android.build.gradle.internal.tasks.IncrementalTask​​.taskAction(IncrementalTask​​.groovy:71)
    在org.gradle.api.internal.BeanDynamicObject $ MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
    在org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)
    在org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
    在com.android.build.gradle.tasks.PackageApplication_Decorated.invokeMethod(来源不明)
    在org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
    在org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:217)
    在org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
    在org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:199)
    在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:526)
    在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:509)
    在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 67更多
 

解决方案

也许你有文件bcprov-jdk15on-1.48.jar(或类似),其与Android Studio的冲突。

我已经从删除以下文件: Android的SDK-MacOSX的/ tools / lib目录/ /库/的Java /扩展/

另外,我已经从主目录中删除.gradle文件夹。

[Fixed the problem] I put an jar file at especially directory. I removed it and I can launch app with Android Studio.

[Problem] I use Mac OS X. Before appearing Android Studio, I installed groovy, gradle with gvm. And I used android gradle plugin.

I installed Android Studio from Android developers and try building app. but,

:HelloAndroidStudio:packageDebug FAILED

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':HelloAndroidStudio:packageDebug'.

class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

My settings is wrong?

Additinal System variable (JAVA_HOME) settings is need?

Please help me.

I add Exception next.

Exception is:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':HelloAndroidStudio: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.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:35)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:179)
    at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:232)
    at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
    at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)
    at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter.execute(CacheLockReleasingTaskExecuter.java:33)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.ContextualisingTaskExecuter.execute(ContextualisingTaskExecuter.java:34)
    at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter$1.run(CacheLockAcquiringTaskExecuter.java:39)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
    at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
    at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
    at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
    at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter.execute(CacheLockAcquiringTaskExecuter.java:37)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:282)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:48)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:27)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:89)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
    at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
    at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
    at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
    at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    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:48)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.Main.main(Main.java:39)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: java.lang.VerifyError: class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z
    at com.android.builder.internal.packaging.Packager.<init>(Packager.java:253)
    at com.android.builder.AndroidBuilder.packageApk(AndroidBuilder.java:1022)
    at com.android.builder.AndroidBuilder$packageApk.call(Unknown Source)
    at com.android.build.gradle.tasks.PackageApplication.doFullTaskAction(PackageApplication.groovy:71)
    at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.groovy:71)
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
    at com.android.build.gradle.tasks.PackageApplication_Decorated.invokeMethod(Unknown Source)
    at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:217)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:199)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:526)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:509)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 67 more

解决方案

Probably you have files bcprov-jdk15on-1.48.jar (or similar) that conflicts with Android Studio.

I've removed these files from: android-sdk-macosx/tools/lib/ /Library/Java/Extensions/

Also I've deleted .gradle folder from the home directory.

这篇关于问题当以最大OS X packageDebug推出错误的Andr​​oid工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆