'String' has not been declared error

Try a really simple program.

Don't explicitly #include any libraries
Declare and initialise a String in setup()
print the String in setup()

Does it work ?

Whether it works or not consider using strings (lowercase s - zero terminated arrays of chars) rather than memory gobling Strings (uppercase S - objects created using the String library)