C# &引用;找不到advapi32“;logcat中出错(在Unity android构建中)
我目前正在连接MySql数据库。编辑器中一切正常,创建了连接并正确发送了请求。但在为android创建了一个构建之后,一切都不起作用。我打开adb logcat查看发生了什么,发现了以下错误:C# &引用;找不到advapi32“;logcat中出错(在Unity android构建中),c#,android,unity3d,mysql-connector,advapi32,C#,Android,Unity3d,Mysql Connector,Advapi32,我目前正在连接MySql数据库。编辑器中一切正常,创建了连接并正确发送了请求。但在为android创建了一个构建之后,一切都不起作用。我打开adb logcat查看发生了什么,发现了以下错误: 05-25 19:03:47.176 11925 11966 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35) 05-25 19:03:47.176 11925 11966 I Unity : 05-25 19:0
05-25 19:03:47.176 11925 11966 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35) 05-25 19:03:47.176 11925 11966 I Unity : 05-25 19:03:47.237 11925 11966 I Unity : START-------------------------------- 05-25 19:03:47.237 11925 11966 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35) 05-25 19:03:47.237 11925 11966 I Unity : 05-25 19:03:47.287 11925 11966 E Unity : Unable to find advapi32 05-25 19:03:47.458 11925 11966 E Unity : PlatformNotSupportedException: Operation is not supported on this platform. 05-25 19:03:47.458 11925 11966 E Unity : at MySql.Data.MySqlClient.MySqlConfiguration..cctor () [0x00000] in <c6d996d13b714bca9031ad07266ac074>:0 05-25 19:03:47.458 11925 11966 E Unity : Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.MySqlConfiguration' threw an exception. 05-25 19:03:47.458 11925 11966 E Unity : at MySql.Data.MySqlClient.Replication.ReplicationManager..cctor () [0x0001e] in <c6d996d13b714bca9031ad07266ac074>:0 05-25 19:03:47.458 11925 11966 E Unity : Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception. 05-25 19:03:47.458 11925 11966 E Unity : at MySql.Data.MySqlClient.MySqlConnection.Open () [0x0016c] in <c6d996d13b714bca9031ad07266ac074>:0 05-25 19:03:47.458 11925 11966 E Unity : at DataBaseConnector.Start () [0x00031] in <d9c30f043e7e4454a72a12dfc0c90991>:0
private string ConnectionString;
private string dbName = "***";
private string dbUsername = "***";
private string dbPassword = "***";
private string dbServer = "***";
private string dbPort = "***";
public TextMeshProUGUI debug;
Account account;
MySqlConnection conn;
MySqlDataReader reader;
private void Awake()
{
ConnectionString = string.Format("server={0};port={1};uid={2};pwd={3};database={4}",
dbServer,
dbPort,
dbUsername,
dbPassword,
dbName
);
}
void Start()
{
conn = new MySqlConnection();
print("START--------------------------------");
conn.ConnectionString = ConnectionString;
conn.Open();
account = new Account();
}