【发布时间】:2020-07-26 08:59:31
【问题描述】:
我正在用颤振开发一个应用程序,它连接到树莓派中的 PostgreSQL 服务器。在调试模式下一切正常,但是当我切换到发布模式时,我收到以下错误消息:
PostgreSQLSeverity.error : Attempting to execute query, but connection is not open.
这是帮助解决方案的连接代码:
static PostgreSQLConnection openConnection(){
var connection = PostgreSQLConnection(ip, port, dbName, username: 'xxxxxxxxx', password: 'xxxxxxxx');
connection.open();
return connection;
}
我不知道从哪里开始寻找错误或其他东西。关于如何处理这个问题的任何想法?
谢谢。
【问题讨论】:
-
嗨@morita_06,我正在尝试与您完全相同(将postgresql连接到flutter),请您提供一些指示或有用的链接。谢谢
-
@GraSim 嗨,我的问题与发布版本有关。除此之外,该应用程序可以很好地连接到 PostgreSQL。接受的答案解决了我的问题。如果您方便我给您写一封电子邮件,我可以帮助您。
标签: postgresql flutter