Java Android解析平台ParseRequestException:错误的json响应

Java Android解析平台ParseRequestException:错误的json响应,java,android,parse-platform,Java,Android,Parse Platform,所以我尝试用Parse做一个项目,但我的开始真的很糟糕。 在遵循文档中的步骤后,我尝试执行任何请求(登录、对象创建),经过长时间等待(始终超过10-15秒),我得到一个错误,如下所示: com.parse.ParseRequest$ParseRequestException: bad json response Caused by: org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be con

所以我尝试用Parse做一个项目,但我的开始真的很糟糕。 在遵循文档中的步骤后,我尝试执行任何请求(登录、对象创建),经过长时间等待(始终超过10-15秒),我得到一个错误,如下所示:

com.parse.ParseRequest$ParseRequestException: bad json response

Caused by: org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
Parse.initialize(new Parse.Configuration.Builder(this)
                .applicationId(appId)
                .clientKey("")
                .server(serverUrl)
                .addNetworkInterceptor(new ParseLogInterceptor())
                .build()
        );
com.parse.ParseRequest$ParseRequestException:错误的json响应

原因:org.json.JSONException:Value将此添加到构建依赖项:
compile'com.parse:parseinterceptors:0.0.2'

然后像这样初始化解析:

com.parse.ParseRequest$ParseRequestException: bad json response

Caused by: org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
Parse.initialize(new Parse.Configuration.Builder(this)
                .applicationId(appId)
                .clientKey("")
                .server(serverUrl)
                .addNetworkInterceptor(new ParseLogInterceptor())
                .build()
        );

使用该日志输出,您可能会发现它正在使用错误的服务器URL或错误的应用程序id进行初始化。如果没有,您将在日志中获得完整的HTML响应,这将使您更好地了解正在发生的事情。

Nasch,非常感谢您的帮助。借助于此,我找到了问题的根源。这是链接中的一个输入错误,隐藏得很好。再次感谢!