10:56:24.766: SEVERE: com.android.jack.CommandLine: Internal compiler error (version 1.3-b2 'Douarn' (320400 bfc75939a2e32be4feddc59d656afb274397ed65 [email protected])):
java.util.ServiceConfigurationError: javax.annotation.processing.Processor: Provider butterknife.compiler.ButterKnifeProcessor could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at com.android.jack.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcessorManager.discoverNextProcessor(BatchAnnotationProcessorManager.java:156)
at com.android.jack.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:116)
at com.android.jack.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
at com.android.jack.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:909)
at com.android.jack.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)
at com.android.jack.frontend.java.JackBatchCompiler.performCompilation(JackBatchCompiler.java:223)
at com.android.jack.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1712)
at com.android.jack.frontend.java.JackBatchCompiler.compile(JackBatchCompiler.java:188)
at com.android.jack.Jack.buildSession(Jack.java:977)
at com.android.jack.Jack.run(Jack.java:496)
at com.android.jack.Jack.checkAndRun(Jack.java:431)
at com.android.jack.CommandLine.runJack(CommandLine.java:82)
at com.android.jack.Main.main(Main.java:85)
Caused by: java.lang.NoClassDefFoundError: com/sun/tools/javac/tree/JCTree$Visitor
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 15 more
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.tree.JCTree$Visitor
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 20 more
java.util.ServiceConfigurationError: javax.annotation.processing.Processor: Provider butterknife.compiler.ButterKnifeProcessor could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at com.android.jack.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcessorManager.discoverNextProcessor(BatchAnnotationProcessorManager.java:156)
at com.android.jack.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:116)
at com.android.jack.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
at com.android.jack.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:909)
at com.android.jack.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)
at com.android.jack.frontend.java.JackBatchCompiler.performCompilation(JackBatchCompiler.java:223)
at com.android.jack.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1712)
at com.android.jack.frontend.java.JackBatchCompiler.compile(JackBatchCompiler.java:188)
at com.android.jack.Jack.buildSession(Jack.java:977)
at com.android.jack.Jack.run(Jack.java:496)
at com.android.jack.Jack.checkAndRun(Jack.java:431)
at com.android.jack.CommandLine.runJack(CommandLine.java:82)
at com.android.jack.Main.main(Main.java:85)
Caused by: java.lang.NoClassDefFoundError: com/sun/tools/javac/tree/JCTree$Visitor
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 15 more
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.tree.JCTree$Visitor
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 20 more
关键信息是:
Provider butterknife.compiler.ButterKnifeProcessor could not be instantiated
java.lang.ClassNotFoundException: com.sun.tools.javac.tree.JCTree$Visitor
解决方案是:
add
org.gradle.jvmargs=-Xmx1536m
in gradle.properties file.