<p dir="auto">Trying to set up glide on existing project with 3-beta5 gradle plugin</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="compile 'com.github.bumptech.glide:glide:4.1.1'
kapt 'com.github.bumptech.glide:compiler:4.1.1'"><pre class="notranslate"><code class="notranslate">compile 'com.github.bumptech.glide:glide:4.1.1'
kapt 'com.github.bumptech.glide:compiler:4.1.1'
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@GlideModule
class LGlideModule : AppGlideModule()"><pre class="notranslate"><code class="notranslate">@GlideModule
class LGlideModule : AppGlideModule()
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="e: java.lang.IllegalStateException: failed to analyze: java.lang.NoSuchMethodError: com.squareup.javapoet.MethodSpec$Builder.addJavadoc(Lcom/squareup/javapoet/CodeBlock;)Lcom/squareup/javapoet/MethodSpec$Builder;
	at org.jetbrains.kotlin.analyzer.AnalysisResult.throwIfError(AnalysisResult.kt:57)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:138)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:170)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:58)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:93)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:46)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:92)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$2.invoke(CompileServiceImpl.kt:386)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$2.invoke(CompileServiceImpl.kt:98)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:832)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:98)
	at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:859)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:831)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:385)
	at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: com.squareup.javapoet.MethodSpec$Builder.addJavadoc(Lcom/squareup/javapoet/CodeBlock;)Lcom/squareup/javapoet/MethodSpec$Builder;
	at com.bumptech.glide.annotation.compiler.RequestOptionsGenerator.generateStaticMethodEquivalentForRequestOptionsStaticMethod(RequestOptionsGenerator.java:347)
	at com.bumptech.glide.annotation.compiler.RequestOptionsGenerator.generateStaticMethodOverridesForRequestOptions(RequestOptionsGenerator.java:299)
	at com.bumptech.glide.annotation.compiler.RequestOptionsGenerator.generate(RequestOptionsGenerator.java:115)
	at com.bumptech.glide.annotation.compiler.AppModuleProcessor.maybeWriteAppModule(AppModuleProcessor.java:87)
	at com.bumptech.glide.annotation.compiler.GlideAnnotationProcessor.process(GlideAnnotationProcessor.java:125)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
	at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:73)
	at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:42)
	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:205)
	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:166)
	at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:82)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:96)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:106)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:83)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:377)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:68)
	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:96)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:368)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:133)
	... 29 more"><pre class="notranslate"><code class="notranslate">e: java.lang.IllegalStateException: failed to analyze: java.lang.NoSuchMethodError: com.squareup.javapoet.MethodSpec$Builder.addJavadoc(Lcom/squareup/javapoet/CodeBlock;)Lcom/squareup/javapoet/MethodSpec$Builder;
	at org.jetbrains.kotlin.analyzer.AnalysisResult.throwIfError(AnalysisResult.kt:57)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:138)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:170)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:58)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:93)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:46)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:92)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$2.invoke(CompileServiceImpl.kt:386)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$2.invoke(CompileServiceImpl.kt:98)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:832)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:98)
	at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:859)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:831)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:385)
	at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: com.squareup.javapoet.MethodSpec$Builder.addJavadoc(Lcom/squareup/javapoet/CodeBlock;)Lcom/squareup/javapoet/MethodSpec$Builder;
	at com.bumptech.glide.annotation.compiler.RequestOptionsGenerator.generateStaticMethodEquivalentForRequestOptionsStaticMethod(RequestOptionsGenerator.java:347)
	at com.bumptech.glide.annotation.compiler.RequestOptionsGenerator.generateStaticMethodOverridesForRequestOptions(RequestOptionsGenerator.java:299)
	at com.bumptech.glide.annotation.compiler.RequestOptionsGenerator.generate(RequestOptionsGenerator.java:115)
	at com.bumptech.glide.annotation.compiler.AppModuleProcessor.maybeWriteAppModule(AppModuleProcessor.java:87)
	at com.bumptech.glide.annotation.compiler.GlideAnnotationProcessor.process(GlideAnnotationProcessor.java:125)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
	at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:73)
	at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:42)
	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:205)
	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:166)
	at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:82)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:96)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:106)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:83)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:377)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:68)
	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:96)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:368)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:133)
	... 29 more
</code></pre></div>
<p dir="auto"><strong>Glide Version</strong>: 4.0.0-RC1</p>

<p dir="auto"><strong>Integration libraries</strong>: OkHttp3</p>

<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:<br>
I'm trying migrate to v4 and got stuck with auto-generated GlideApp.</p>

<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GlideApp.with..."><pre class="notranslate"><span class="pl-smi">GlideApp</span>.<span class="pl-smi">with</span>...</pre></div>
<p dir="auto"><strong>I'v got a Glide Module class:</strong></p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@GlideModule
public final class MyGlideModule extends AppGlideModule {


  @Inject 
  @Named(&quot;GLIDE_CLIENT&quot;)
  protected OkHttpClient client;


    public MyGlideModule() {
        AccountComponent().inject(this);
    }

    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        builder.setMemoryCache(new LruResourceCache(10 * 1024 * 1024));
    }

    @Override
    public void registerComponents(Context context, Registry glide) {
        glide.replace(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client));
        glide.register(SVG.class, PictureDrawable.class, new ImageLoadingUtils.SvgDrawableTranscoder())
                .append(InputStream.class, SVG.class, new ImageLoadingUtils.SvgDecoder());
    }

    @Override
    public boolean isManifestParsingEnabled() {
        return false;
    }
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">GlideModule</span>
<span class="pl-k">public</span> <span class="pl-k">final</span> <span class="pl-k">class</span> <span class="pl-smi">MyGlideModule</span> <span class="pl-k">extends</span> <span class="pl-smi">AppGlideModule</span> {


  <span class="pl-c1">@</span><span class="pl-c1">Inject</span> 
  <span class="pl-c1">@</span><span class="pl-c1">Named</span>(<span class="pl-s">"GLIDE_CLIENT"</span>)
  <span class="pl-k">protected</span> <span class="pl-smi">OkHttpClient</span> <span class="pl-s1">client</span>;


    <span class="pl-k">public</span> <span class="pl-smi">MyGlideModule</span>() {
        <span class="pl-en">AccountComponent</span>().<span class="pl-en">inject</span>(<span class="pl-smi">this</span>);
    }

    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">applyOptions</span>(<span class="pl-smi">Context</span> <span class="pl-s1">context</span>, <span class="pl-smi">GlideBuilder</span> <span class="pl-s1">builder</span>) {
        <span class="pl-s1">builder</span>.<span class="pl-en">setMemoryCache</span>(<span class="pl-k">new</span> <span class="pl-smi">LruResourceCache</span>(<span class="pl-c1">10</span> * <span class="pl-c1">1024</span> * <span class="pl-c1">1024</span>));
    }

    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">registerComponents</span>(<span class="pl-smi">Context</span> <span class="pl-s1">context</span>, <span class="pl-smi">Registry</span> <span class="pl-s1">glide</span>) {
        <span class="pl-s1">glide</span>.<span class="pl-en">replace</span>(<span class="pl-smi">GlideUrl</span>.<span class="pl-k">class</span>, <span class="pl-smi">InputStream</span>.<span class="pl-k">class</span>, <span class="pl-k">new</span> <span class="pl-smi">OkHttpUrlLoader</span>.<span class="pl-smi">Factory</span>(<span class="pl-s1">client</span>));
        <span class="pl-s1">glide</span>.<span class="pl-en">register</span>(<span class="pl-smi">SVG</span>.<span class="pl-k">class</span>, <span class="pl-smi">PictureDrawable</span>.<span class="pl-k">class</span>, <span class="pl-k">new</span> <span class="pl-smi">ImageLoadingUtils</span>.<span class="pl-smi">SvgDrawableTranscoder</span>())
                .<span class="pl-en">append</span>(<span class="pl-smi">InputStream</span>.<span class="pl-k">class</span>, <span class="pl-smi">SVG</span>.<span class="pl-k">class</span>, <span class="pl-k">new</span> <span class="pl-smi">ImageLoadingUtils</span>.<span class="pl-smi">SvgDecoder</span>());
    }

    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">boolean</span> <span class="pl-en">isManifestParsingEnabled</span>() {
        <span class="pl-k">return</span> <span class="pl-c1">false</span>;
    }
}</pre></div>
<p dir="auto">In my build.gradle file i have those dependencies</p>
<div class="highlight highlight-source-groovy notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    compile &quot;com.github.bumptech.glide:glide:4.0.0-RC1&quot;
    compile 'com.android.support:support-v4:25.3.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
    compile 'com.caverock:androidsvg:1.2.1'"><pre class="notranslate">    compile <span class="pl-s"><span class="pl-pds">"</span>com.github.bumptech.glide:glide:4.0.0-RC1<span class="pl-pds">"</span></span>
    compile <span class="pl-s"><span class="pl-pds">'</span>com.android.support:support-v4:25.3.1<span class="pl-pds">'</span></span>
    annotationProcessor <span class="pl-s"><span class="pl-pds">'</span>com.github.bumptech.glide:compiler:4.0.0-RC1<span class="pl-pds">'</span></span>
    compile <span class="pl-s"><span class="pl-pds">'</span>com.caverock:androidsvg:1.2.1<span class="pl-pds">'</span></span></pre></div>

<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Error:(83, 4) error: cannot find symbol variable GlideApp"><pre class="notranslate"><span class="pl-en">Error</span>:<span class="pl-kos">(</span><span class="pl-c1">83</span><span class="pl-kos">,</span> <span class="pl-c1">4</span><span class="pl-kos">)</span> <span class="pl-pds">error</span>: <span class="pl-en">cannot</span> <span class="pl-en">find</span> <span class="pl-en">symbol</span> <span class="pl-en">variable</span> <span class="pl-v">GlideApp</span></pre></div>

<p dir="auto">Also i cloned SVG's samples and there autogeneration works fine. Can Dagger2 conflict with Glide? Or any suggetions, how can i fix it?</p>