com.google.gson.internal -- Cannot be resolved

Avatar

Avatar

sathyaprakasha2

Avatar

sathyaprakasha2

sathyaprakasha2

11-06-2020

Hi Team,

 

How to add embed-dependency in bnd-maven-plugin. wanna add com.google.gson

 

com.google.gson.internal -- Cannot be resolved

 

View Entire Topic

Avatar

Avatar

davidjgonzalezzzz

Avatar

davidjgonzalezzzz

davidjgonzalezzzz

17-02-2021

You're supposed to be directly referencing anything in the com.google.gson.internal package... that's why it's called "internal". 

See the big warning on the GSON JavaDocs site for these internal packages [1] that reads: Do NOT use any class in this package as they are meant for internal use in Gson. Infact, this package is no longer exported at all in later versions of GSON.

 

The fix is to update your code to depend on Gson's public API space.

 

[1] https://javadoc.io/doc/com.google.code.gson/gson/1.7.2/com/google/gson/internal/package-summary.html