大家好,我正在创建一个应用程序,我正在尝试使用 android 作为前端和 JSON/php 将用户详细信息存储在 mysql 数据库中以发布电子邮件地址、名字、姓氏等。
当我尝试存储/发布数据时,我得到以下 logcat 输出日志,任何人都可以通过更好地解释日志来提出任何提示。注意我在“index.php”中声明了“Email_address”。
07-29 19:20:48.463: E/JSON(340): <br />n<font size='1'><table class='xdebug-error xe-notice xe-scream' dir='ltr' border='1' cellspacing='0' cellpadding='1'>n<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> SCREAM: Error suppression ignored for</th></tr>n<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Email_address in C:\wamp\www\socialeyes\index.php on line <i>57</i></th></tr>n<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>n<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0019</td><td bgcolor='#eeeeec' align='right'>267768</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp\www\socialeyes\index.php' bgcolor='#eeeeec'>..\index.php<b>:</b>0</td></tr>n</table></font>n{"tag":"register","success":0,"error":2,"error_msg":"User already existed"}n
07-29 19:20:48.481: E/JSON Parser(340): Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
07-29 19:20:48.481: D/AndroidRuntime(340): Shutting down VM
07-29 19:20:48.491: W/dalvikvm(340): threadid=1: thread exiting with uncaught exception (group=0x40015560)
07-29 19:20:48.523: E/AndroidRuntime(340): FATAL EXCEPTION: main
07-29 19:20:48.523: E/AndroidRuntime(340): java.lang.NullPointerException
07-29 19:20:48.523: E/AndroidRuntime(340): at wavedevelopment.socialeyes.RegisterActivity$1.onClick(RegisterActivity.java:78)
07-29 19:20:48.523: E/AndroidRuntime(340): at android.view.View.performClick(View.java:2485)
07-29 19:20:48.523: E/AndroidRuntime(340): at android.view.View$PerformClick.run(View.java:9080)
07-29 19:20:48.523: E/AndroidRuntime(340): at android.os.Handler.handleCallback(Handler.java:587)
07-29 19:20:48.523: E/AndroidRuntime(340): at android.os.Handler.dispatchMessage(Handler.java:92)
07-29 19:20:48.523: E/AndroidRuntime(340): at android.os.Looper.loop(Looper.java:123)
07-29 19:20:48.523: E/AndroidRuntime(340): at android.app.ActivityThread.main(ActivityThread.java:3683)
07-29 19:20:48.523: E/AndroidRuntime(340): at java.lang.reflect.Method.invokeNative(Native Method)
07-29 19:20:48.523: E/AndroidRuntime(340): at java.lang.reflect.Method.invoke(Method.java:507)
07-29 19:20:48.523: E/AndroidRuntime(340): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-29 19:20:48.523: E/AndroidRuntime(340): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-29 19:20:48.523: E/AndroidRuntime(340): at dalvik.system.NativeStart.main(Native Method)
07-29 19:20:50.981: I/Process(340): Sending signal. PID: 340 SIG: 9