unity连接MySQL数据库导入dll报错的解决方法 |
您所在的位置:网站首页 › 解决dll与支持库版本不匹配 › unity连接MySQL数据库导入dll报错的解决方法 |
虽然这个方法解决了导入dll引发的报错,但由于我使用的mysql版本是8.0,一旦连接数据库,使用低版本的Mysql.Data.dll会报错 Client does not support authentication protocol requested by server; consider upgrading MySQL client 试着用8.0.24的Mysql.Data.dll去连接,就不会报这个错误,可能是导入的dll与mysql的版本不匹配,如果mysql是5.x版本的,应该不会报错,可以接着看下去,如果是8.0版本,可以点击进去看这篇文章。 最近在做的一个Unity项目需要连接Mysql数据库,而这需要导入dll,如下图 Assembly ‘Assets/Plugins/MySql.Data.dll’ will not be loaded due to errors: Unable to resolve reference ‘Google.Protobuf’. Is the assembly missing or incompatible with the current platform? Unable to resolve reference ‘BouncyCastle.Crypto’. Is the assembly missing or incompatible with the current platform? Unable to resolve reference ‘Renci.SshNet’. Is the assembly missing or incompatible with the current platform? 该错误是版本太高,得需要低点的版本,下面是6.3的版本 链接: https://pan.baidu.com/s/1Pit00O2s5nak60XfUHfeoA 提取码: ycsq 还有个错误 Microsoft ® Visual C# Compiler version 2.9.1.65535 (9d34608e) 这需要在Player Setting中设置脚本的运行环境与dll的环境相同(上图中红框中的部分) 解决办法如下图 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |