I have maven and java installed on my system. When typing "import com.google.gson.Gson;" does not seam to work. See image one or code sample one.
(code sample one)
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
I have been fiddling around with my pom.xml file. I think the problem is somewhat related to the pom.xml file?? See image two or code sample two. plz help, just some pointers would help i have been searching for hours.
(code sample two)
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<scope>compile</scope>
</dependency>
When running code i get this error message:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at TDT4100_project/skibuddies.conditionsAvalanchGetters.WeatherGetter.main(WeatherGetter.java:97)
Try to add requires com.google.gson;
in your module-info.java
file.