Ionic v1构建错误将字节码转换为dex

时间:2019-02-12 19:57:02

标签: android cordova ionic-framework

在同步另一个kotlin项目后,我在构建ionic v1时遇到问题。

当我使用cordova运行android时,我得到的错误是:

  

这是由使用   Java 8或更高版本。如果您在   库子模块添加targetCompatibility ='1.7'sourceCompatibility   =子模块的build.gradle文件的'1.7'。   超出预期的最高级别:   java.lang.RuntimeException:异常解析类    ...另外16个   1个错误;流产

     

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

     
      
  • 出了什么问题:任务':transformClassesWithDexForDebug'的执行失败。

         
        

    com.android.build.api.transform.TransformException:java.lang.RuntimeException:java.lang.RuntimeException:     com.android.ide.common.process.ProcessException:     java.util.concurrent.ExecutionException:     com.android.ide.common.process.ProcessException:dex的返回代码1     处理

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

  •   

在我的文件build.gradle文件中,我有VERSION_1_6的编译选项

我还将jdk的版本更改为6和7,而我已经拥有8。并且我尝试将版本更改为VERSION_1_7,但仍然相同。

我将其更改为VERSION_1_8,并要求启用jackOptions,但我明白了。

  
    

transformClassesWithPreJackPackagedLibrariesForDebugERROR:CipherSuite.java:49-50:来自jar文件的Lambda需要它们     要编译的类路径上的接口,未知接口是     java.util.Comparator错误:ConnectionPool.java:57-58:即将到来Lambda     来自jar文件的文件需要在类路径上的接口进行编译,     未知的接口是java.lang.Runnable错误:     RealWebSocket.java:156-157:来自jar文件的Lambda需要它们     要编译的类路径上的接口,未知接口是     java.lang.Runnable错误:Util.java:238-239:来自jar的Lambda     文件需要在类路径上编译其接口,未知     接口是java.util.concurrent.ThreadFactory错误:     Util.java:87-88:来自jar文件的Lambda需要在其接口上     要编译的类路径,未知接口是     java.util.Comparator

  
     

org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ IncrementalTask​​Action.doExecute(AnnotationProcessingTaskFactory.java:245)     在   org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)     在   org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ IncrementalTask​​Action.execute(AnnotationProcessingTaskFactory.java:232)     在   org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)     在   org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)     在   org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)     在   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.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)     在   org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)     在   org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)     在   org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)     在   org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)     在   org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)     在   org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)     在   org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)     在   org.gradle.execution.taskgraph.Abs​​tractTaskPlanExecutor $ TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)     在   org.gradle.execution.taskgraph.Abs​​tractTaskPlanExecutor $ TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)     在   org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)     在   org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)     在   org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)     在   org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)     在   org.gradle.execution.DefaultBuildExecuter.access $ 000(DefaultBuildExecuter.java:23)     在   org.gradle.execution.DefaultBuildExecuter $ 1.proceed(DefaultBuildExecuter.java:43)     在   org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)     在   org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)     在   org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)     在   org.gradle.initialization.DefaultGradleLauncher $ 4.run(DefaultGradleLauncher.java:153)     在org.gradle.internal.Factories $ 1.create(Factories.java:22)在   org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)     在   org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)     在   org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)     在   org.gradle.initialization.DefaultGradleLauncher.access $ 200(DefaultGradleLauncher.java:32)     在   org.gradle.initialization.DefaultGradleLauncher $ 1.create(DefaultGradleLauncher.java:98)     在   org.gradle.initialization.DefaultGradleLauncher $ 1.create(DefaultGradleLauncher.java:92)     在   org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)     在   org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)     在   org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)     在   org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)     在   org.gradle.launcher.exec.InProcessBuildActionExecuter $ DefaultBuildController.run(InProcessBuildActionExecuter.java:99)     在   org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)     在   org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)     在   org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)     在   org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)     在   org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)     在   org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)     在   org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)     在   org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:74)     在   org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:72)     在org.gradle.util.Swapper.swap(Swapper.java:38)处   org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)     在   org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.exec.FoundBuildEnvironment.doBuild(FoundBuildEnvironment.java:72)     在   org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)     在   org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)     在   org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy $ 1.run(StartBuildOrRespondWithBusy.java:50)     在   org.gradle.launcher.daemon.server.DaemonStateCoordinator $ 1.run(DaemonStateCoordinator.java:237)     在   org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)     在   org.gradle.internal.concurrent.StoppableExecutorImpl $ 1.run(StoppableExecutorImpl.java:40)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     在   java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)     在java.lang.Thread.run(Thread.java:748)造成原因:   com.android.jack.JackAbortException在   com.android.jack.abort.Aborter.run(Aborter.java:35)在   com.android.jack.abort.Aborter.run(Aborter.java:29)在   com.android.sched.scheduler.ScheduleInstance.runWithLog(ScheduleInstance.java:209)     在   com.android.sched.scheduler.MultiWorkersScheduleInstance $ SequentialTask​​.process(MultiWorkersScheduleInstance.java:466)     在   com.android.sched.scheduler.MultiWorkersScheduleInstance $ Worker.run(MultiWorkersScheduleInstance.java:163)

     

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

     
      
  • 出了什么问题:任务':transformClassesWithPreJackPackagedLibrariesForDebug'的执行失败。      
        

    com.android.build.api.transform.TransformException:com.android.jack.api.v01.CompilationException

      
  •   

0 个答案:

没有答案