Type mismatch; found : org.apache.spark.rdd.RDD[String] required: org.apache.spark.rdd.RDD[java.io.Serializable]

Sir, While i am writing a test case , i am getting below error

type mismatch; found : org.apache.spark.rdd.RDD[String] required: org.apache.spark.rdd.RDD[java.io.Serializable] Note: String <: java.io.Serializable, but class RDD is invariant in type T. You may wish to define T as +T instead. (SLS 4.5)

what does this mean and how to fix it , please help me

@sha_p : Can you please provide more information/code on how you are creating variables!