实际设备上的网络超时,但不在仿真器上

时间:2015-12-04 05:46:59

标签: java android mysql jdbc

我有一个应用程序使用jdbc查询远程数据库以登录。我有一个Android 5.0模拟器,可以快速连接到数据库,没有任何抱怨。但是,在我测试的每个硬件设备上,连接到数据库失败并显示错误

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. ... Caused by: java.net.ConnectException: failed to connect to dallas113.arvixeshared.com/207.210.200.136 (port 3306): connect failed: ETIMEDOUT (Connection timed out)

就像我说的那样,数据库工作正常,并且所有设备都具有快速的互联网连接。我在清单中设置了<uses-permission android:name="android.permission.INTERNET" />。我非常感谢任何帮助。

0 个答案:

没有答案