Element 'dependency' cannot have character [children], because the type's content type is element-only
解决方法:
idea的maven pom.xml添加的依赖可以引入但有红色波浪线,原来是网上复制的dependency中子标签前面有看不到的空格,删除空格即可。
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>