首页 > 解决方案 > 表没有保存到我的解析服务器上?

问题描述

我的服务器已设置并通过 SSH 访问,但现在尝试连接到解析服务器和相同的内容我收到此错误“com.parse.ParseRequest$ParseRequestException: i/o failure”

公共类 StarterApplication 扩展应用程序 {

@Override
public void onCreate() {
    super.onCreate();


    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);

    // Add your initialization code here
    Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
            .applicationId("**********")
            .clientKey("**************")
            .server("http://**********/parse/")
            .build()
    );

并且在活动中

ParseObject score = new ParseObject("Score");
    score.put("username", "dwayne");
    score.put("score", 45);
    score.saveInBackground(new SaveCallback() {
        @Override
        public void done(ParseException e) {
            if (e == null) {
                // OK
                Log.i("Success", "We saved the score");
            } else {
                e.printStackTrace();
            }
        }
    });

试图让它记录到我的 AWS 解析服务器中,但什么都没有保存

标签: javaparse-server

解决方案


如果您发布 index.js 来比较您的服务器设置,这可能会有所帮助。

根据您的服务器设置,您可能需要在服务器 url 中使用 http 而不是 http

 .server("https://**********/parse/")

推荐阅读