我在尝试保存要解析的数据时收到此错误。
com.parse.ParseRequest $ ParseRequestException:缺少用户密码
这是我的应用程序类
public class ParseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// Register Subclass
ParseObject.registerSubclass(One.class);
ParseObject.registerSubclass(Two.class);
Parse.enableLocalDatastore(this);
Parse.initialize(this, "app_key", "client_key");
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
ParsePush.subscribeInBackground("Testing", new SaveCallback() {
@Override
public void done(ParseException e) {
if(e==null)
System.out.println("Subscribed Successfully");
else
e.printStackTrace();
System.out.println("Unable to Subscribe");
}
});
//To save the current device on Parse Installation
ParseInstallation.getCurrentInstallation().saveInBackground();
}
}