我想在数据库中保存用户名和密码,但遗憾的是该应用已关闭。我无法理解java文件中使用的url以及如何创建Wamp服务器数据库的url。
请解释一下并解决。 感谢您的建议。
09-15 07:51:34.866: E/WindowManager(3370): android.view.WindowLeaked:
Activity com.example.mysqltest.Register has leaked window
com.android.internal.policy.impl.PhoneWindow$DecorView{b2d949b8 V.E.....
R.....ID 0,0-304,96} that was originally added here
09-15 07:51:34.866: E/WindowManager(3370): at
android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
09-15 07:51:34.866: E/WindowManager(3370): at
android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
09-15 07:51:34.866: E/WindowManager(3370): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
09-15 07:51:34.866: E/WindowManager(3370): at
android.app.Dialog.show(Dialog.java:286)
09-15 07:51:34.866: E/WindowManager(3370): at
com.example.mysqltest.Register$CreateUser.onPreExecute(Register.java:86)
09-15 07:51:34.866: E/WindowManager(3370): at
android.os.AsyncTask.executeOnExecutor(AsyncTask.java:587)
09-15 07:51:34.866: E/WindowManager(3370): at
android.os.AsyncTask.execute(AsyncTask.java:535)
09-15 07:51:34.866: E/WindowManager(3370): at
com.example.mysqltest.Register.onClick(Register.java:68)
09-15 07:51:34.866: E/WindowManager(3370): at
android.view.View.performClick(View.java:4438)
09-15 07:51:34.866: E/WindowManager(3370): at
android.view.View$PerformClick.run(View.java:18422)
09-15 07:51:34.866: E/WindowManager(3370): at
android.os.Handler.handleCallback(Handler.java:733)
09-15 07:51:34.866: E/WindowManager(3370): at
android.os.Handler.dispatchMessage(Handler.java:95)
09-15 07:51:34.866: E/WindowManager(3370): at
android.os.Looper.loop(Looper.java:136)
09-15 07:51:34.866: E/WindowManager(3370): at
android.app.ActivityThread.main(ActivityThread.java:5017)
09-15 07:51:34.866: E/WindowManager(3370): at
java.lang.reflect.Method.invokeNative(Native Method)
09-15 07:51:34.866: E/WindowManager(3370): at
java.lang.reflect.Method.invoke(Method.java:515)
09-15 07:51:34.866: E/WindowManager(3370): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
09-15 07:51:34.866: E/WindowManager(3370): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
09-15 07:51:34.866: E/WindowManager(3370): at
dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
不建议直接从Android应用程序访问mysql数据库。您可以使用php创建一个简单的Web服务,然后调用该服务 使用HTTP客户端。