Jackコンパイラを使用しているときにこれらのエラーが発生しますが、何が問題なのか理解できません。
Error:Library reading phase: file '/Users/daniele.vitali/Development/Android-studio/INTROCKAND/app/build/intermediates/packaged/debug/classes.Zip' is an invalid library
com.Android.jack.api.v01.CompilationException: Library reading phase: file '/Users/daniele.vitali/Development/Android-studio/INTROCKAND/app/build/intermediates/packaged/debug/classes.Zip' is an invalid library
at com.Android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.Java:113)
at com.Android.builder.core.AndroidBuilder.convertByteCodeUsingJackApis(AndroidBuilder.Java:1821)
at com.Android.builder.core.AndroidBuilder.convertByteCodeUsingJack(AndroidBuilder.Java:1694)
at com.Android.build.gradle.internal.transforms.JackTransform.runJack(JackTransform.Java:222)
at com.Android.build.gradle.internal.transforms.JackTransform.transform(JackTransform.Java:196)
at com.Android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.Java:174)
at com.Android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.Java:170)
at com.Android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.Java:55)
at com.Android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.Java:47)
at com.Android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.Java:169)
at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
at Java.lang.reflect.Method.invoke(Method.Java:498)
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)
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:66)
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.runner.BuildModelActionRunner.run(BuildModelActionRunner.Java:46)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.Java:35)
at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.Java:58)
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:78)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.Java:48)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.Java:52)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.Java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.Java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.Java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.Java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.Java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.Java:72)
at org.gradle.util.Swapper.swap(Swapper.Java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.Java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.Java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.Java:66)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.Java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.Java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.Java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.Java:41)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.Java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.Java:246)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.Java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.Java:40)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1142)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:617)
at Java.lang.Thread.run(Thread.Java:745)
Error:com.Android.jack.JackAbortException: Library reading phase: file '/Users/daniele.vitali/Development/Android-studio/INTROCKAND/app/build/intermediates/packaged/debug/classes.Zip' is an invalid library
at com.Android.jack.incremental.IncrementalInputFilter.<init>(IncrementalInputFilter.Java:201)
at Sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at Sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.Java:62)
at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.Java:45)
at Java.lang.reflect.Constructor.newInstance(Constructor.Java:423)
at com.Android.sched.util.config.ReflectFactory.create(ReflectFactory.Java:90)
at com.Android.jack.Jack.buildSession(Jack.Java:846)
at com.Android.jack.Jack.run(Jack.Java:475)
at com.Android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.Java:102)
... 93 more
Error:com.Android.jack.library.LibraryReadingException: Library reading phase: file '/Users/daniele.vitali/Development/Android-studio/INTROCKAND/app/build/intermediates/packaged/debug/classes.Zip' is an invalid library
at com.Android.jack.incremental.IncrementalInputFilter.<init>(IncrementalInputFilter.Java:199)
... 101 more
Error:com.Android.jack.library.LibraryFormatException: file '/Users/daniele.vitali/Development/Android-studio/INTROCKAND/app/build/intermediates/packaged/debug/classes.Zip' is an invalid library
... 102 more
:app:transformJackWithJackForDebug FAILED
Error:Execution failed for task ':app:transformJackWithJackForDebug'.
> com.Android.build.api.transform.TransformException: com.Android.jack.api.v01.CompilationException: Library reading phase: file '/Users/daniele.vitali/Development/Android-studio/INTROCKAND/app/build/intermediates/packaged/debug/classes.Zip' is an invalid library
Information:BUILD FAILED
Information:Total time: 1 mins 53.934 secs
Information:5 errors
Information:0 warnings
Information:See complete output in console
私はAndroid Studio 2.2 Preview 2を使用しており、次の依存関係があります:
ext {
//Android config
compileSdkVersion = 23
buildToolsVersion = '24.0.0 rc4'
minSdkVersion = 16
targetSdkVersion = 23
//Libraries
supportLibrariesVersion = '24.0.0-beta1'
lombokVersion = '1.16.8'
guavaVersion = '19.0'
gsonVersion = '2.6.2'
butterKnifeVersion = '8.0.1'
rxAndroidVersion = '1.2.0'
firebaseVersion = '9.0.1'
frescoVersion = '0.10.0'
jUnitVersion = '4.12'
mockitoVersion = '2.0.54-beta'
hamcrestVersion = '2.0.0.0'
daggerVersion = '2.4'
googlePlayServicesVersion = '9.0.1'
circularImageViewVersion = '2.0.0'
bottomBarVersion = '1.3.4'
}
Gradleプラグイン2.2.0 alpha 2とcom.google.gms:google-services:3.0.0も使用しています
どんな助けでも大歓迎です。
ダンプの「AnnotationProcessing」に気づきました。まだ実行していない場合は、これが役立つ場合があります。 Jackがライブラリの注釈処理を処理できるように、Butterknifeの依存関係にannotationProcessorを追加する必要がありました。
dependencies {
compile 'com.jakewharton:butterknife:8.0.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'
}
短剣用のものもあります...
dependencies {
compile 'com.google.dagger:dagger:2.0'
annotationProcessor 'com.google.dagger:dagger-compiler:2.0'
}
繰り返しになりますが、あなたの問題ではないかもしれませんが、私が昨日ジャックから始めたとき、いくつかの問題は解決しました。
プロジェクトのクリーンビルドを実行すると、このエラーは解決しました。
私は細かいコードを実行することを約束しました。さらに、いくつかの変更を加えた後、このエラーが発生しました。
何も機能していません:元に戻す、クリーン、現在のブランチをここにリセット...、再構築、再起動...
私のために働きました:プロジェクトを削除し、VCからプロジェクトをチェックアウトします!
結論:理由はおそらくコードまたはbuild.gradleにありません。
バターナイフを使用する1つのプロジェクトで同じ問題があり、build.gradleファイルでannotationProcessorを指定しても役に立たなかった。
結局、プロジェクトからバターナイフを削除するという痛い決断に至り、問題なくビルドできるようになりました。