You must register this ParseObject subclass before instantiating it

Subby

I am getting the following error in my Android application using Parse:

You must register this ParseObject subclass before instantiating it.

In my Application object, I am doing the following inside onCreate:

Parse.enableLocalDatastore(this);
Parse.initialize(this, "code", "code");

So why am I still getting this error? It was working fine yesterday but it's all of a sudden stopped working.

This is my Manifest file:

 <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        ....

LogCat:

 java.lang.IllegalArgumentException: You must register this ParseObject subclass before instantiating it.
            at com.parse.ParseObject.<init>(ParseObject.java:157)
            at com.parse.ParseObject.<init>(ParseObject.java:119)
            at usmaan.app.models.Game.<init>(Game.java:25)
            at usmaan.app.models.Game.to(Game.java:86)
            at usmaan.app.adapters.GamesAdapter.getView(GamesAdapter.java:47)
            at android.widget.AbsListView.obtainView(AbsListView.java:2344)
            at android.widget.ListView.makeAndAddView(ListView.java:1864)
Samuel Barbosa

You must call ParseObject.registerSubclass(YourClassName.class); before calling Parse.initialize().

In addition, you need to annotate your custom class like this:

@ParseClassName("YourClassName")
public class YourClassName extends ParseObject
{
}

Finally, your custom class needs a default no-args constructor in order to be registered by ParseObject.


Reference: Subclassing Parse Object

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ParseException: "You must register this ParseObject subclass before instantiating it."

From Dev

Subclassing a ParseObject Subclass (Android)

From Dev

Is it possible to partially subclass a ParseObject?

From Dev

In backbone, do you define a model's attributes before instantiating?

From Dev

Converting a record stored as a ParseObject to a subclass

From Dev

Instantiating a subclass from a superclass

From Dev

Instantiating a UIView subclass from a UIViewController

From Dev

Before you login you must answer me these questions 3?

From Dev

Sitecore "You must lock this item before you can edit" is missing

From Dev

Calling pjlib from unknown/external thread. You must " "register external threads with pj_thread_register()

From Dev

Parse error : Must specify a ParseObject class name

From Dev

Preview mode must have started before you can take a picture

From Dev

You must call EnsureLoaded on the File plugin before using the DownloadCache

From Dev

Preview mode must have started before you can take a picture

From Dev

Before you can run VMware several modules must be compiled

From Dev

You must call EnsureLoaded on the File plugin before using the DownloadCache

From Dev

Instantiating subclass of JNA Structure throws IllegalAccessException

From Dev

What are the advantages for instantiating a subclass as superclass type?

From Dev

Instantiating a class within a subclass and accessing its instance within another subclass

From Dev

Register event handler for specific subclass

From Dev

You must call the "WebSecurity.InitializeDatabaseConnection" method before you call any other method of the "WebSecurity" class

From Dev

Error while sending Email :you must load or assign this property before you can read its value -EWS

From Dev

Swift subclass' init must set all properties before calling super but property requires super's init to complete first

From Dev

Swift subclass' init must set all properties before calling super but property requires super's init to complete first

From Dev

Wait for data to load before instantiating a component

From Dev

Guice: instantiating a singleton before creating the module

From Dev

PHP check class parent before instantiating

From Dev

Visual Studio 2013: "No framework version is selected, you must select one before creating a project."

From Dev

Python: gensim: RuntimeError: you must first build vocabulary before training the model

Related Related

  1. 1

    ParseException: "You must register this ParseObject subclass before instantiating it."

  2. 2

    Subclassing a ParseObject Subclass (Android)

  3. 3

    Is it possible to partially subclass a ParseObject?

  4. 4

    In backbone, do you define a model's attributes before instantiating?

  5. 5

    Converting a record stored as a ParseObject to a subclass

  6. 6

    Instantiating a subclass from a superclass

  7. 7

    Instantiating a UIView subclass from a UIViewController

  8. 8

    Before you login you must answer me these questions 3?

  9. 9

    Sitecore "You must lock this item before you can edit" is missing

  10. 10

    Calling pjlib from unknown/external thread. You must " "register external threads with pj_thread_register()

  11. 11

    Parse error : Must specify a ParseObject class name

  12. 12

    Preview mode must have started before you can take a picture

  13. 13

    You must call EnsureLoaded on the File plugin before using the DownloadCache

  14. 14

    Preview mode must have started before you can take a picture

  15. 15

    Before you can run VMware several modules must be compiled

  16. 16

    You must call EnsureLoaded on the File plugin before using the DownloadCache

  17. 17

    Instantiating subclass of JNA Structure throws IllegalAccessException

  18. 18

    What are the advantages for instantiating a subclass as superclass type?

  19. 19

    Instantiating a class within a subclass and accessing its instance within another subclass

  20. 20

    Register event handler for specific subclass

  21. 21

    You must call the "WebSecurity.InitializeDatabaseConnection" method before you call any other method of the "WebSecurity" class

  22. 22

    Error while sending Email :you must load or assign this property before you can read its value -EWS

  23. 23

    Swift subclass' init must set all properties before calling super but property requires super's init to complete first

  24. 24

    Swift subclass' init must set all properties before calling super but property requires super's init to complete first

  25. 25

    Wait for data to load before instantiating a component

  26. 26

    Guice: instantiating a singleton before creating the module

  27. 27

    PHP check class parent before instantiating

  28. 28

    Visual Studio 2013: "No framework version is selected, you must select one before creating a project."

  29. 29

    Python: gensim: RuntimeError: you must first build vocabulary before training the model

HotTag

Archive