Giter VIP home page Giter VIP logo

Comments (3)

DieterVDW avatar DieterVDW commented on July 24, 2024

Ironically, I also get this error when I try it on the following class (only file in the module):

public class Foo { }

This is my pom (apart from this there is only the artifact details in the pom, nothing else):

  <dependencies>
    <dependency>
      <groupId>com.google.auto.value</groupId>
      <artifactId>auto-value</artifactId>
      <version>1.7</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.6</version>
    </dependency>
    <dependency>
      <groupId>com.ryanharter.auto.value</groupId>
      <artifactId>auto-value-gson</artifactId>
      <version>1.3.0</version>
    </dependency>
  </dependencies>

  <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <source>11</source>
            <target>11</target>
<!--
            <annotationProcessorPaths>
                <path>
                    <groupId>com.google.auto.value</groupId>
                    <artifactId>auto-value</artifactId>
                    <version>1.7</version>
                </path>
            </annotationProcessorPaths>
-->
          </configuration>
        </plugin>
      </plugins>
  </build>

When I uncomment the annotationProcessorsPath section I get the following error (using the Foo class code from the first post):

[ERROR] /Users/dieterpersonal/Google Drive/AudioHarvest/Code/AudioHarvest/model/src/main/java/com/ascentinel/audioharvest/model/Foo.java:[27,29] cannot find symbol
  symbol:   class GsonTypeAdapter
  location: class com.ascentinel.audioharvest.model.AutoValue_Foo

Totally clueless here, this seems like the absolute minimal testcase?
Any ideas what could be wrong with my build?

from auto-value-gson.

DieterVDW avatar DieterVDW commented on July 24, 2024

In fact simply adding the dependency to any module makes the module fail with this error...

from auto-value-gson.

DieterVDW avatar DieterVDW commented on July 24, 2024

Much ado about nothing!
If I had read the part about the gradle dependencies in my enthousiasm, I could have found I had to actually add the annotation processors!

It works absolutely brilliantly now.

from auto-value-gson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.