Home » Java » Generated source files giving error of “incompatible type” by using different String object in Android

Generated source files giving error of “incompatible type” by using different String object in Android

Posted by: admin July 12, 2018 Leave a comment

Questions:

I am developing an Android object in which I have used java.lang.String as the String object. When I build the project, I get following errors in files Manifest.java and BuildConfig.java located in directory “app/build/generated/source/r/debug”:

error: incompatible types: java.lang.String cannot be converted to com.wordpress.zeel.silverglitters.String

I tried changing them to java.lang.String and rebuilding the project but got the same outcome. Please help me out.

Answers: