auto-value-parcel: Java.lang.NoSuchMethodError: com.squareup.javapoet.TypeName.isBoxedPrimitive()Z
Hi,
I tried to update to the latest 0.2.2 and I have this error while compiling.
[...]GeevApp.java
Error:(12, 59) error: cannot find symbol class DaggerApplicationComponent
[...]GeevServiceModule.java
Error:(5, 38) error: package com.ryanharter.auto.value.gson does not exist
Warning:@AutoValue classes cannot have abstract methods other than property getters and Builder converters
:app:compileRetrolambdaDebug
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.NoSuchMethodError: com.squareup.javapoet.TypeName.isBoxedPrimitive()Z
I use those AutoValue versions:
// Autovalue
apt 'com.google.auto.value:auto-value:1.2'
provided 'com.jakewharton.auto.value:auto-value-annotations:1.2-update1'
apt 'com.ryanharter.auto.value:auto-value-parcel:0.2.2'
apt 'com.ryanharter.auto.value:auto-value-gson:0.3.1'
Everything ok on 0.2.1
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (5 by maintainers)
Try adding
apt 'com.squareup:javapoet:1.7.0'before dagger, otherwise the version bundled in dagger will be on the classpath.Even
apt 'com.squareup:javapoet:1.7.0'won’t fix it for me. Also I’m using Dagger 2.4.EDIT:
apt with auto-value-parcel 0.2.1
apt with auto-value-parcel 0.2.2
I’m using Dagger 2.4,
Adding javapoet:1.7.0 solved the problem. Commenting it back, problem back.
Thanks 😃
Your version of JavaPoet is being resolved incorrectly on the
aptclasspath for reasons that I still can’t figure out.Adding
first will fix this