2016-03-28 30 views
0

Web sitesi https://parse.com/docs/downloads 'dan ayrıştırma projesini indirdim ve Heroku'da kurulum sunucusunu çalıştırdığımda uygulamayı çalıştırmayı denediğimde basitçe çöküyor. Tüm yapılandırma değişkenleri doğru şekilde bunları doğruladı. ben hala bir kez İşte buradaAndroid'de Ayrıntı

package com.parse.starter; 

import android.app.Application; 
import android.util.Log; 

import com.parse.Parse; 
import com.parse.ParseACL; 
import com.parse.ParseException; 
import com.parse.ParseObject; 
import com.parse.ParseUser; 
import com.parse.SaveCallback; 


public class StarterApplication extends Application { 

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

    // Enable Local Datastore. 
    Parse.initialize(new Parse.Configuration.Builder(getApplicationContext()) 
        .applicationId("instagram2EGB") 
        .clientKey("eugf236x") 
        .server("https://instagram2149.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"); 
     } 
     } 
    }); 


    // Add your initialization code here 
    Parse.initialize(this); 

    ParseUser.enableAutomaticUser(); 
    ParseACL defaultACL = new ParseACL(); 
    // Optionally enable public read access. 
    // defaultACL.setPublicReadAccess(true); 
    ParseACL.setDefaultACL(defaultACL, true); 
    } 
} 

(i android stüdyo v1.5.1 çalıştırıyorum) ve tamamen ince ve varsayılan kodu kod bile Ayrıştırmayla hata Error shown while running the app

+1

Parse kapatıldı. Başka bir alternatif için tercih edin –

+0

Diğer alternatifler nelerdir parse –

+0

@salihkallai Heroku'da bir sunucu kurduysanız iyi olacaksınız - Parse hizmetine bağlı değilsiniz (Ocak 2017'de kapanıyor) ama kaynak ayrıştırma sunucusu projesi. – Ilya

cevap

1
public class StarterApplication extends Application { 

    @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("instagram2EGB") 
        .clientKey("eugf236x") 
        .server("https://instagram2149.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"); 
     } 
     } 
    }); 


    ParseUser.enableAutomaticUser(); 
    ParseACL defaultACL = new ParseACL(); 
    // Optionally enable public read access. 
    // defaultACL.setPublicReadAccess(true); 
    ParseACL.setDefaultACL(defaultACL, true); 
    } 
} 
0

mi Ayrıştırma kaydedilemedi. (heroku kullanıyorum)

İlgili konular