0

I am working off of the stable build for a project I am working on in a group. This build is confirmed to be working.

It appears that the above method is undefined.

I am working off of the following maven dependency:

com.vaadin.external.google:android-json:0.0.20131108.vaadin1

Why is the method shown as not existing on my end?

Apologies for lack of clarity, if any. It is very late where I am.

ollitietavainen
  • 3,900
  • 13
  • 30
PhiliDips
  • 1
  • 1
  • 1
    what JSONObject are you using? Have you checked it's documentation? – Stultuske Dec 07 '21 at 08:07
  • 2
    "his build is confirmed to be working" what does that mean? Is it working somewhere else but not on your computer? "Why is the method shown as not existing..." What does that mean? Do you get a compile error? Or a runtime error? Or is this your IDE complaining? – cfrick Dec 07 '21 at 08:24

1 Answers1

2

The org.json.JsonObject class from the dependency

        <dependency>
            <groupId>com.vaadin.external.google</groupId>
            <artifactId>android-json</artifactId>
            <version>0.0.20131108.vaadin1</version>
        </dependency>

does not contain a method called toMap. You can confirm this by downloading the -sources.jar from here: https://repo1.maven.org/maven2/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/ . You can unzip the .jar file to find the sources.

If the build works elsewhere, it could be that there's a different version of android-json (or another library with a JSONObject class - there are several) included where the build runs.

ollitietavainen
  • 3,900
  • 13
  • 30