Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Ghazal
, 1 year ago
"] = true; print_r(json_encode($response)); ?> and here is my logcat: 04-30 15:55:06.585 11289-11289/? I/art: Not late-enabling -Xcheck:jni (already on) 04-30 15:55:06.708 11289-11289/com.google.android.gms.fit.samples.basichistoryapi W/System
via Stack Overflow by Omkar Dixit
, 10 months ago
Value <br of type java.lang.String cannot be converted to JSONObject
via Stack Overflow by Vijay
, 8 months ago
via Stack Overflow by Jonathan
, 6 months ago
Value <br of type java.lang.String cannot be converted to JSONObject
via Stack Overflow by NiamLeeson
, 11 months ago
Value true of type java.lang.Boolean cannot be converted to JSONObject
via Stack Overflow by pot34731
, 10 months ago
Value data of type java.lang.String cannot be converted to JSONObject
org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
 Here is my php code: <?php
     $con = mysqli_connect("DBHOST", "USERNAME", "PASSWORD!", "DBNAME");
     $username = $_POST["username"];
     $password = $_POST["password"];
     $statement = mysqli_prepare($con, "INSERT INTO user (username, password) VALUES (?, ?)");
     mysqli_stmt_bind_param($statement, "ss", $username, $password);
     mysqli_stmt_execute($statement);
     $response = array();
     $response["success"] = true;  
     print_r(json_encode($response));
?>
 and here is my logcat:  04-30 15:55:06.585 11289-11289/? I/art: Not late-enabling -Xcheck:jni (already on)
 04-30 15:55:06.708 11289-11289/com.google.android.gms.fit.samples.basichistoryapi W/System: ClassLoader     referenced unknown path:   /data/app/com.google.android.gms.fit.samples.basichistoryapi-1/lib/x86
 04-30 15:55:06.956 11289-11319/com.google.android.gms.fit.samples.basichistoryapi D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
 04-30 15:55:07.062 11289-11319/com.google.android.gms.fit.samples.basichistoryapi I/OpenGLRenderer: Initialized EGL, version 1.4
 04-30 15:55:07.094 11289-11319/com.google.android.gms.fit.samples.basichistoryapi W/EGL_emulation: eglSurfaceAttrib not implemented
 04-30 15:55:07.094 11289-11319/com.google.android.gms.fit.samples.basichistoryapi W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xad7e0740, error=EGL_SUCCESS
 04-30 15:55:19.158 11289-11289/com.google.android.gms.fit.samples.basichistoryapi W/System.err: org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject	at org.json.JSON.typeMismatch(JSON.java:111)	at org.json.JSONObject.(JSONObject.java:160)	at org.json.JSONObject.(JSONObject.java:173)	at com.google.android.gms.fit.samples.basichistoryapi.Login$2$1.onResponse(Login.java:85)	at com.google.android.gms.fit.samples.basichistoryapi.Login$2$1.onResponse(Login.java:80)	at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:60)	at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:30)	at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99)	at android.os.Handler.handleCallback(Handler.java:739)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:148)	at android.app.ActivityThread.main(ActivityThread.java:5417)	at java.lang.reflect.Method.invoke(Native Method)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)