解决Java“type mismatch cannot convert from byte[] to string”问题

【问题描述】

byte[] 类型直接赋值给String类型时,报错:“type mismatch cannot convert from byte[] to string“

类似的,String 类型直接赋值给byte[] 类型时,报错:“type mismatch cannot convert from string to byte[]“


【解决方法】

在工程属性 => "Order and Export" 中,将 xerces 的jar 放到最后,然后重新build 项目


你可能感兴趣的:(解决Java“type mismatch cannot convert from byte[] to string”问题)