String cannot be applied to com.org.apache.xpath.internal.operations.String

前端 未结 2 460
南方客
南方客 2021-01-28 08:39

I\'m trying to create a PieChart in JavaFX, and I want to fill it with data from a HashMap.

Here\'s my code:

public Graph(HashM         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-28 09:29

    You seem to have imported the wrong "String" class ( com.org.apache.xpath.internal.operations.String) in your current file and the Data class expects the correct one (java.lang.String). Make sure your imports are correct (i.e. remove the import of the first type).

    Also see this question, where the asker has run into a similar problem

提交回复
热议问题