Sabir Moglad Sabir Moglad - 1 year ago 113
Android Question

my local parse server is not working

I am trying to use Parse on my windows PC with android studio.

I followed some tutorials to install mongoDB, Parse server and Parse dashboard, and all went smooth.

when I open android studio, the parse server initializes but it doesn't save the data and I don't what went wrong

here is my manifest code:

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android=""
package="com.parse.starter" >

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

android:theme="@style/AppTheme" >
android:value="kooora.com100plus" />
android:value="kooora.com100plusMasterKey" />

android:label="@string/app_name" >
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


I changed the key and the client ID as the same ones when I set my parse Server

and here is the code for the start application activity:

public class StarterApplication extends Application {

public void onCreate() {

// Enable Local Datastore.

// Add your initialization code here

Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())

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", e.getMessage());

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

after I run the code I got Parse: failure!

I don't know what is wrong with my code

Answer Source


When you run the code in your app, localhost means "this device" AKA your Android device, not the server.

You need to use the IP address of the server there (which will depend if you are using an emulator or a physical device).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download