我想使用 PHP 从 MySQL 数据库中获取数据并将其显示在 Android 活动中。我对其进行编码并传递 JSON 数组,但有一个问题我不知道如何连接到服务器,并且我的所有数据库都在本地服务器上。我对其进行编码 请告诉我哪里出错了,以便我得到准确的结果。我会非常感谢你。
我的所有数据库都在本地主机中,并且没有打开活动。显示错误“意外停止”:(我怎样才能得到准确的结果。请指导我
现在它给出了这些错误:(并加载保存的详细信息
12-08 11:09:19.314: E/WindowManager(19972): Activity com.example.visit.record.My_Task has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40555850 that was originally added here
12-08 11:09:19.314: E/WindowManager(19972): android.view.WindowLeaked: Activity com.example.visit.record.My_Task has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40555850 that was originally added here
12-08 11:09:19.314: E/WindowManager(19972): at android.view.ViewRoot.<init>(ViewRoot.java:277)
12-08 11:09:19.314: E/WindowManager(19972): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
12-08 11:09:19.314: E/WindowManager(19972): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
12-08 11:09:19.314: E/WindowManager(19972): at android.view.Window$LocalWindowManager.addView(Window.java:433)
12-08 11:09:19.314: E/WindowManager(19972): at android.app.Dialog.show(Dialog.java:288)
12-08 11:09:19.314: E/WindowManager(19972): at com.example.visit.record.My_Task$GetTaskDetails.onPreExecute(My_Task.java:149)
12-08 11:09:19.314: E/WindowManager(19972): at android.os.AsyncTask.execute(AsyncTask.java:391)
12-08 11:09:19.314: E/WindowManager(19972): at com.example.visit.record.My_Task.onCreate(My_Task.java:107)
12-08 11:09:19.314: E/WindowManager(19972): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
12-08 11:09:19.314: E/WindowManager(19972): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1785)
12-08 11:09:19.314: E/WindowManager(19972): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1842)
12-08 11:09:19.314: E/WindowManager(19972): at android.app.ActivityThread.access$1500(ActivityThread.java:132)
12-08 11:09:19.314: E/WindowManager(19972): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
12-08 11:09:19.314: E/WindowManager(19972): at android.os.Handler.dispatchMessage(Handler.java:99)
12-08 11:09:19.314: E/WindowManager(19972): at android.os.Looper.loop(Looper.java:143)
12-08 11:09:19.314: E/WindowManager(19972): at android.app.ActivityThread.main(ActivityThread.java:4268)
12-08 11:09:19.314: E/WindowManager(19972): at java.lang.reflect.Method.invokeNative(Native Method)
12-08 11:09:19.314: E/WindowManager(19972): at java.lang.reflect.Method.invoke(Method.java:507)
12-08 11:09:19.314: E/WindowManager(19972): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-08 11:09:19.314: E/WindowManager(19972): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-08 11:09:19.314: E/WindowManager(19972): at dalvik.system.NativeStart.main(Native Method)