新来解析,无法注册一个ParseUser [英] New to Parse, not able to sign up a ParseUser
问题描述
我只是想基本的解析快速入门指南在这里找到:
I am just following the basic Parse quickstart guide found here:
https://www.parse.com/apps/快速启动#社交/移动/安卓/本地/新
一切编译并运行得很好,但我查了一下,发现没有用户实际上正在签约的解析。我查了日志,这里是我得到的错误:
Everything compiled and ran just fine, but I checked and found that no user was actually being signed up on Parse. I checked the log and here is the error I am getting:
PARSE.COM﹕ FAILEDjava.lang.IllegalArgumentException: Cannot save a ParseUser until it has been signed up. Call signUp first.-1
下面是code我一起工作。正如你所看到的,我刚才复制的教程正好与另外输出到日志中。
Here is the code I am working with. As you can see, I just copied the tutorial exactly with the addition of outputting to the Log.
public class ParseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// Initialize Crash Reporting.
ParseCrashReporting.enable(this);
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(this, "myappid", "mykey");
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
ParseUser user = new ParseUser();
user.setUsername("my name");
user.setPassword("my pass");
user.setEmail("email@example.com");
// other fields can be set just like with PareObject
user.put("phone", "650-555-0000");
user.signUpInBackground(new SignUpCallback() {
public void done(ParseException e) {
if (e == null) {
Log.e("PARSE.COM", "SUCCESS");
} else {
Log.e("PARSE.COM","FAILED" + e.getMessage() + Integer.toString(e.getCode()));
// Sign up didn't succeed. Look at the ParseException
// to figure out what went wrong
}
}
});
}
}
我不明白为什么错误提示我先打电话注册,是不是正是我与signUpInBackground做什么?任何帮助将大大AP preciated。
I don't understand why the error is prompting me to call signUp first, is that not exactly I am doing with signUpInBackground? Any help would be greatly appreciated.
推荐答案
它看起来像一个相同的错误。
https://developers.facebook.com/bugs/426365424187686/
如果删除Parse.enableLocalDatastore(本);这将是做工精细。
(API级别无所谓)
和..他们向我保证,他们将修复与下一个版本的bug。
但尽管更新(1.8.2-> 1.9.0)它是没有保留。
it looks like a same bug. https://developers.facebook.com/bugs/426365424187686/ if you delete "Parse.enableLocalDatastore(this);" it will be work fine. (API level doesn't matter) and.. they assured me that they will fix the bug with next release. but despite of updates(1.8.2->1.9.0) it is remained yet.
我即将对不起我蹩脚的英语。
i'm sorry about my broken english.
这篇关于新来解析,无法注册一个ParseUser的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!