Java / parse error Trying to send from Android SDK to parse

This was set for another application a few days ago and works normally. The result was successfully sent to mongolab

Any ideas? thank you!

@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("abc123")
            .clientKey(null)
            .server("http://abc123.herokuapp.com/parse/")
    .build()
    );

      ParSEObject gamescore = new ParSEObject("Gamescore");
      gamescore.put("score",1337);
      gamescore.put("playerName","Sean Plott");
      gamescore.put("cheatMode",false);
      gamescore.saveInBackground(new SaveCallback() {
          public void done(ParseException e) {
              if (e == null) {
                  Log.i("Parse","Save Succeeded");
              } else {
                  Log.i("Parse","Save Failed");
              }
          }
      });@H_403_15@ 
 

——日志在最后显示———

D/InputMethodManagerService: ime_enabled = false is same as last value,no change
W/InputMethodManagerService: Got remoteexception sending setActive(false) notification to pid 23566 uid 10087
I/ActivityManager: Displayed com.parse.starter/.MainActivity: +410ms (total +10m33s240ms)
D/WindowManager: topDisplayedActivityInfo,appToken: Token{2e99c6e0 ActivityRecord{2e79b238 u0 com.parse.starter/.MainActivity t19}}
W/System: Ignoring header X-Parse-Client-Key because its value was null.
W/System: Ignoring header X-Parse-Client-Key because its value was null.
W/System: Ignoring header X-Parse-Client-Key because its value was null.
D/dalvikvm: GC_FOR_ALLOC freed 600K,25% free 2735K/3644K,paused 10ms,total 10ms
W/System: Ignoring header X-Parse-Client-Key because its value was null.
I/Parse: Save Failed@H_403_15@

Solution

Your client key is empty

Add client key from heroku settings

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>