Cannot resolve method ‘toCharArray’ in ‘String’ String类中竟然没有了toCharArray方法,怎么回事啊,后面发现是导包的问题。 把这个删除走就可以了。