Unhandled exception: com.parse.parseException android studio

Here is my code:

package com.alibdeir.database; import android.content.Context; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.parse.GetCallback; import com.parse.Parse; import com.parse.ParseObject; import com.parse.ParseQuery; import com.parse.SaveCallback; import com.parse.ParseException; public class MainActivity extends AppCompatActivity { TextView output; Button increase; int currentInt; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Parse.initialize(this, "QeaC0wiXsL9MyRbLaQ***********", "kDjoZVRu4OyWOGxPtPjh**************"); output = (TextView) findViewById(R.id.output); increase = (Button) findViewById(R.id.increase); ParseQuery query = new ParseQuery("int"); ParseObject o = query.get-("n6zA3CHxGx"); } public void increase(View v) { currentInt = Integer.parseInt(output.getText().toString()); output.setText(currentInt + 1 + ""); } } 

Note: ParseQuery query = new ParseQuery ("int"); ParseObject o = query.get ("n6zA3CHxGx");

When you hover over the query query.get ("n6zA3CHxGx"); I have a mistake mentioned in the title. I am trying to update an object that is in the parsing cloud. IS object in the cloud. Please, help

0
source share
1 answer
  • Trying your code with a descriptor exception using try { .. } catch like this.

     try { Parse.initialize(this, "QeaC0wiXsL9MyRbLaQ***********", "kDjoZVRu4OyWOGxPtPjh**************"); output = (TextView) findViewById(R.id.output); increase = (Button) findViewById(R.id.increase); ParseQuery query = new ParseQuery("int"); ParseObject o = query.get-("n6zA3CHxGx"); } catch (com.parse.ParseException e1) { e1.printStackTrace(); } 
  • According to this Pars forum discussion , the default ACL settings are a public read, an owner record. You can change them for recording by other users .

Using the code below: -

 ParseACL postACL = new ParseACL(ParseUser.getCurrentUser()); postACL.setPublicReadAccess(true); postACL.setPublicWriteAccess(true); 
0
source

Source: https://habr.com/ru/post/1233938/


All Articles