安卓:为jdbc在Android设备支持? [英] Android : Is JDBC supported in Android devices?

查看:137
本文介绍了安卓:为jdbc在Android设备支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做使用JDBC将数据发送到数据库中,而无需使用任何Web服务的Andr​​oid应用程序。我没有采用Android 2.2模拟器一个实验,我能够将数据发送到MySQL数据库(本地)。从那以后,我尝试过采用Android 2.2设备发送,我改变了路径,从 的jdbc:mysql的://10.0.2.2:3306 / 的jdbc:mysql的://xx.xx.xx.xx:3306 /

XX.XX.XX.XX距离 IPCONFIG 我的本地机器。但它不工作的设备。可能是什么原因。

主要疑虑:

  1. 请Android设备目前支持JDBC?
  2. 在将Android 2.2支持JDBC?
  3. 如果支持,它的Andr​​oid版本将支持JDBC?
解决方案

是的。你一定记得把你的JDBC连接code在的AsyncTask ,  否则,你会燃烧BURN刻录!

I am doing an Android application using JDBC to send data to database without using any web services. I did an experiment using Android 2.2 emulator and I am able to send data to MySQL DB (LOCALHOST). After that I tried to send using Android 2.2 device, I changed the path from jdbc:mysql://10.0.2.2:3306/ with jdbc:mysql://xx.xx.xx.xx:3306/.

xx.xx.xx.xx is from ipconfig of my localhost machine. But it is not working in the device. What could be the reason.

Main doubts:

  1. Do Android devices currently support JDBC?
  2. Will Android 2.2 support JDBC?
  3. If supported, which Android versions will support JDBC?

解决方案

Yes. You must remember to put your JDBC connection code in an AsyncTask, otherwise you will BURN BURN BURN!

这篇关于安卓:为jdbc在Android设备支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆