I am new to parse.com and android studio. I tried to create a table in parse by simply giving some test data but when the app runs the emulator says "unfortunately the app has stopped".
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import com.parse.Parse;
import com.parse.ParseObject;
public class fresh_app extends Activity {
Button b1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fresh_app);
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
b1=(Button)findViewById(R.id.button);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ParseObject testObject = new ParseObject("TestObject");
testObject.put("foo", "bar");
testObject.saveInBackground();
}
});
}
The gradle dependicies are :
compile files('libs/Parse-1.10.3/Parse-1.10.3.jar')
compile 'com.parse.bolts:bolts-android:1.+'
Parse#enableLocalDatastore(Context)must be invoked beforeParse#initialize(Context)at os.ZygoteInit.main(ZygoteInit.java:694) @VladMatvienko @sakir @Wesley this is what my logcat says