我做了本地使用解析平台的迁移过程。我已经在本地主机上部署了parse-server-example实例,并将数据库托管在mongolab上。第一步是我尝试使用本地解析服务器并在mongolab上托管的数据库实例上注册用户。
这是本地部署的解析服务器的index.js,以下是android的代码段。
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
Stetho.initializeWithDefaults(this);
// Add your initialization code here
//Parse.initialize(this);
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.applicationId("my app id")
.clientKey("my client key")
.server("http://10.12.41.250:1337/parse/") // '/' important after 'parse'
.addNetworkInterceptor(new ParseStethoInterceptor())
.build());
....
....
final ParseUser parseUser = new ParseUser();
parseUser.setUsername(edtUsername.getText().toString());
parseUser.setPassword(edtPassword.getText().toString());
parseUser.signUpInBackground(new SignUpCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
Toast.makeText(SignUpActivity.this, "You are now registered.", Toast.LENGTH_SHORT).show();
//Success
} else {
Toast.makeText(SignUpActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
Log.d(TAG, e.getMessage());
//Failure
}
}
});
执行此操作后,我收到带有错误消息“不支持此身份验证方法”的ParseRequestException,现在我不知道它是什么,到目前为止,我发现的唯一内容是This。
以下是网络拦截器的详细信息。
任何形式的帮助将不胜感激。
因此,这是一个问题,现在已修复。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句