[转帖]编程 android、 php、 mysql 连接_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3205 | 回复: 0   主题: [转帖]编程 android、 php、 mysql 连接        下一篇 
landy
注册用户
等级:新兵
经验:61
发帖:72
精华:0
注册:2011-12-31
状态:离线
发送短消息息给landy 加好友    发送短消息息给landy 发消息
发表于: IP:您无权察看 2014-11-21 11:51:41 | [全部帖] [楼主帖] 楼主

我有下文中我的日志猫每当我试图将我的 android 应用程序连接到 mysql 使用 php 和 json 解析器错误。任何人都可以在这方面帮我吗?

12-26 06:07:23.222: D/gralloc_goldfish(766): Emulator without GPU emulation detected.
12-26 06:09:34.332: D/dalvikvm(766): GC_FOR_ALLOC freed 89K, 7% free 2794K/3004K, paused 155ms, total 176ms
12-26 06:09:34.402: I/dalvikvm-heap(766): Grow heap (frag case) to 3.447MB for 635812-byte allocation
12-26 06:09:34.642: D/dalvikvm(766): GC_FOR_ALLOC freed 6K, 7% free 3409K/3628K, paused 245ms, total 245ms
12-26 06:09:35.592: I/Choreographer(766): Skipped 50 frames! The application may be doing too much work on its main thread.
12-26 06:09:36.102: I/Choreographer(766): Skipped 109 frames! The application may be doing too much work on its main thread.
12-26 06:09:36.532: I/Choreographer(766): Skipped 91 frames! The application may be doing too much work on its main thread.
12-26 06:09:37.062: I/Choreographer(766): Skipped 103 frames! The application may be doing too much work on its main thread.
12-26 06:09:38.064: I/Choreographer(766): Skipped 54 frames! The application may be doing too much work on its main thread.
12-26 06:09:38.332: I/Choreographer(766): Skipped 36 frames! The application may be doing too much work on its main thread.
12-26 06:09:38.552: I/Choreographer(766): Skipped 56 frames! The application may be doing too much work on its main thread.
12-26 06:09:40.784: E/JSON Parser(766): Error parsing data org.json.JSONException: Value Unknown of type java.lang.String cannot be converted to JSONObject
12-26 06:09:40.872: W/dalvikvm(766): threadid=11: thread exiting with uncaught exception (group=0x41465700)
12-26 06:09:41.032: E/AndroidRuntime(766): FATAL EXCEPTION: AsyncTask #1
12-26 06:09:41.032: E/AndroidRuntime(766): java.lang.RuntimeException: An error occured while executing doInBackground()
12-26 06:09:41.032: E/AndroidRuntime(766): at android.os.AsyncTask$3.done(AsyncTask.java:299)
12-26 06:09:41.032: E/AndroidRuntime(766): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
12-26 06:09:41.032: E/AndroidRuntime(766): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
12-26 06:09:41.032: E/AndroidRuntime(766): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
12-26 06:09:41.032: E/AndroidRuntime(766): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
12-26 06:09:41.032: E/AndroidRuntime(766): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-26 06:09:41.032: E/AndroidRuntime(766): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-26 06:09:41.032: E/AndroidRuntime(766): at java.lang.Thread.run(Thread.java:841)
12-26 06:09:41.032: E/AndroidRuntime(766): Caused by: java.lang.NullPointerException
12-26 06:09:41.032: E/AndroidRuntime(766): at com.example.androidhive.AllProductsActivity$LoadAllProducts.doInBackground(AllProductsActivity.java:108)
12-26 06:09:41.032: E/AndroidRuntime(766): at com.example.androidhive.AllProductsActivity$LoadAllProducts.doInBackground(AllProductsActivity.java:1)
12-26 06:09:41.032: E/AndroidRuntime(766): at android.os.AsyncTask$2.call(AsyncTask.java:287)
12-26 06:09:41.032: E/AndroidRuntime(766): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
12-26 06:09:41.032: E/AndroidRuntime(766): ... 4 more
12-26 06:09:42.514: I/Choreographer(766): Skipped 262 frames! The application may be doing too much work on its main thread.
12-26 06:09:42.684: I/Choreographer(766): Skipped 44 frames! The application may be doing too much work on its main thread.
12-26 06:09:42.992: I/Choreographer(766): Skipped 77 frames! The application may be doing too much work on its main thread.
12-26 06:09:43.602: I/Choreographer(766): Skipped 159 frames! The application may be doing too much work on its main thread.
12-26 06:09:44.852: E/WindowManager(766): Activity com.example.androidhive.AllProductsActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{417251e8 V.E..... R.....ID 0,0-480,144} that was originally added here
12-26 06:09:44.852: E/WindowManager(766): android.view.WindowLeaked: Activity com.example.androidhive.AllProductsActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{417251e8 V.E..... R.....ID 0,0-480,144} that was originally added here
12-26 06:09:44.852: E/WindowManager(766): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:345)
12-26 06:09:44.852: E/WindowManager(766): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:239)
12-26 06:09:44.852: E/WindowManager(766): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
12-26 06:09:44.852: E/WindowManager(766): at android.app.Dialog.show(Dialog.java:281)
12-26 06:09:44.852: E/WindowManager(766): at com.example.androidhive.AllProductsActivity$LoadAllProducts.onPreExecute(AllProductsActivity.java:96)
12-26 06:09:44.852: E/WindowManager(766): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
12-26 06:09:44.852: E/WindowManager(766): at android.os.AsyncTask.execute(AsyncTask.java:534)
12-26 06:09:44.852: E/WindowManager(766): at com.example.androidhive.AllProductsActivity.onCreate(AllProductsActivity.java:50)
12-26 06:09:44.852: E/WindowManager(766): at android.app.Activity.performCreate(Activity.java:5133)
12-26 06:09:44.852: E/WindowManager(766): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-26 06:09:44.852: E/WindowManager(766): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
12-26 06:09:44.852: E/WindowManager(766): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
12-26 06:09:44.852: E/WindowManager(766): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-26 06:09:44.852: E/WindowManager(766): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
12-26 06:09:44.852: E/WindowManager(766): at android.os.Handler.dispatchMessage(Handler.java:99)
12-26 06:09:44.852: E/WindowManager(766): at android.os.Looper.loop(Looper.java:137)
12-26 06:09:44.852: E/WindowManager(766): at android.app.ActivityThread.main(ActivityThread.java:5103)
12-26 06:09:44.852: E/WindowManager(766): at java.lang.reflect.Method.invokeNative(Native Method)
12-26 06:09:44.852: E/WindowManager(766): at java.lang.reflect.Method.invoke(Method.java:525)
12-26 06:09:44.852: E/WindowManager(766): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
12-26 06:09:44.852: E/WindowManager(766): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-26 06:09:44.852: E/WindowManager(766): at dalvik.system.NativeStart.main(Native Method)
12-26 06:09:44.922: I/Choreographer(766): Skipped 82 frames! The application may be doing too much work on its main thread.
12-26 06:09:46.183: I/Process(766): Sending signal. PID: 766 SIG: 9
12-26 06:53:08.933: D/gralloc_goldfish(1056): Emulator without GPU emulation detected.
12-26 06:53:15.462: D/dalvikvm(1056): GC_FOR_ALLOC freed 79K, 7% free 2794K/2992K, paused 187ms, total 224ms
12-26 06:53:15.492: I/dalvikvm-heap(1056): Grow heap (frag case) to 3.447MB for 635812-byte allocation
12-26 06:53:15.702: D/dalvikvm(1056): GC_FOR_ALLOC freed 6K, 6% free 3409K/3616K, paused 208ms, total 208ms
12-26 06:53:16.672: I/Choreographer(1056): Skipped 34 frames! The application may be doing too much work on its main thread.
12-26 06:53:17.162: I/Choreographer(1056): Skipped 118 frames! The application may be doing too much work on its main thread.
12-26 06:53:17.553: I/Choreographer(1056): Skipped 74 frames! The application may be doing too much work on its main thread.
12-26 06:53:18.242: I/Choreographer(1056): Skipped 116 frames! The application may be doing too much work on its main thread.
12-26 06:53:22.182: I/Choreographer(1056): Skipped 39 frames! The application may be doing too much work on its main thread.
12-26 06:53:22.502: I/Choreographer(1056): Skipped 37 frames! The application may be doing too much work on its main thread.
12-26 06:53:22.852: I/Choreographer(1056): Skipped 41 frames! The application may be doing too much work on its main thread.
12-26 06:53:23.014: I/Choreographer(1056): Skipped 41 frames! The application may be doing too much work on its main thread.
12-26 06:53:23.292: I/Choreographer(1056): Skipped 44 frames! The application may be doing too much work on its main thread.
12-26 06:53:23.612: I/Choreographer(1056): Skipped 44 frames! The application may be doing too much work on its main thread.
12-26 06:53:23.822: E/JSON Parser(1056): Error parsing data org.json.JSONException: Value Unknown of type java.lang.String cannot be converted to JSONObject
12-26 06:53:23.822: E/JSON Parser(1056): Error parsing data org.json.JSONException: Value Unknown of type java.lang.String cannot be converted to JSONObject
12-26 06:53:23.892: W/dalvikvm(1056): threadid=11: thread exiting with uncaught exception (group=0x41465700)
12-26 06:53:23.952: I/Choreographer(1056): Skipped 32 frames! The application may be doing too much work on its main thread.
12-26 06:53:24.112: E/AndroidRuntime(1056): FATAL EXCEPTION: AsyncTask #1
12-26 06:53:24.112: E/AndroidRuntime(1056): java.lang.RuntimeException: An error occured while executing doInBackground()
12-26 06:53:24.112: E/AndroidRuntime(1056): at android.os.AsyncTask$3.done(AsyncTask.java:299)
12-26 06:53:24.112: E/AndroidRuntime(1056): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
12-26 06:53:24.112: E/AndroidRuntime(1056): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
12-26 06:53:24.112: E/AndroidRuntime(1056): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
12-26 06:53:24.112: E/AndroidRuntime(1056): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
12-26 06:53:24.112: E/AndroidRuntime(1056): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-26 06:53:24.112: E/AndroidRuntime(1056): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-26 06:53:24.112: E/AndroidRuntime(1056): at java.lang.Thread.run(Thread.java:841)
12-26 06:53:24.112: E/AndroidRuntime(1056): Caused by: java.lang.NullPointerException
12-26 06:53:24.112: E/AndroidRuntime(1056): at com.example.androidhive.AllProductsActivity$LoadAllProducts.doInBackground(AllProductsActivity.java:108)
12-26 06:53:24.112: E/AndroidRuntime(1056): at com.example.androidhive.AllProductsActivity$LoadAllProducts.doInBackground(AllProductsActivity.java:1)
12-26 06:53:24.112: E/AndroidRuntime(1056): at android.os.AsyncTask$2.call(AsyncTask.java:287)
12-26 06:53:24.112: E/AndroidRuntime(1056): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
12-26 06:53:24.112: E/AndroidRuntime(1056): ... 4 more
12-26 06:53:24.793: I/Choreographer(1056): Skipped 89 frames! The application may be doing too much work on its main thread.
12-26 06:53:25.353: I/Choreographer(1056): Skipped 117 frames! The application may be doing too much work on its main thread.
12-26 06:53:25.943: I/Choreographer(1056): Skipped 146 frames! The application may be doing too much work on its main thread.
12-26 06:53:26.693: E/WindowManager(1056): Activity com.example.androidhive.AllProductsActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{4171b938 V.E..... R.....ID 0,0-480,144} that was originally added here
12-26 06:53:26.693: E/WindowManager(1056): android.view.WindowLeaked: Activity com.example.androidhive.AllProductsActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{4171b938 V.E..... R.....ID 0,0-480,144} that was originally added here
12-26 06:53:26.693: E/WindowManager(1056): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:345)
12-26 06:53:26.693: E/WindowManager(1056): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:239)
12-26 06:53:26.693: E/WindowManager(1056): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.Dialog.show(Dialog.java:281)
12-26 06:53:26.693: E/WindowManager(1056): at com.example.androidhive.AllProductsActivity$LoadAllProducts.onPreExecute(AllProductsActivity.java:96)
12-26 06:53:26.693: E/WindowManager(1056): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
12-26 06:53:26.693: E/WindowManager(1056): at android.os.AsyncTask.execute(AsyncTask.java:534)
12-26 06:53:26.693: E/WindowManager(1056): at com.example.androidhive.AllProductsActivity.onCreate(AllProductsActivity.java:50)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.Activity.performCreate(Activity.java:5133)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
12-26 06:53:26.693: E/WindowManager(1056): at android.os.Handler.dispatchMessage(Handler.java:99)
12-26 06:53:26.693: E/WindowManager(1056): at android.os.Looper.loop(Looper.java:137)
12-26 06:53:26.693: E/WindowManager(1056): at android.app.ActivityThread.main(ActivityThread.java:5103)
12-26 06:53:26.693: E/WindowManager(1056): at java.lang.reflect.Method.invokeNative(Native Method)
12-26 06:53:26.693: E/WindowManager(1056): at java.lang.reflect.Method.invoke(Method.java:525)
12-26 06:53:26.693: E/WindowManager(1056): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
12-26 06:53:26.693: E/WindowManager(1056): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-26 06:53:26.693: E/WindowManager(1056): at dalvik.system.NativeStart.main(Native Method)
12-26 06:53:26.723: I/Choreographer(1056): Skipped 45 frames! The application may be doing too much work on its main thread.
12-26 06:53:32.992: D/gralloc_goldfish(1082): Emulator without GPU emulation detected.


解决方法 1:
您正在获取 Caused by: java.lang.NullPointerException 因为 Json 错误。

E/JSON Parser(766): Error parsing data org.json.JSONException: Value Unknown of type java.lang.String cannot be converted to JSONObject


在行号 96 查阅 &

com.example.androidhive.AllProductsActivity$LoadAllProducts.onPreExecute(AllProductsActivity.java:96)


在尝试调试您的代码,您的 JSON 对象获取它的意思是您的响应不是有效,您编写的代码或每个要求的 null。

--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论