java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File com.parse.ParsePlugins.getParseDir()' on a null object reference

前端 未结 2 1488
情书的邮戳
情书的邮戳 2021-02-20 06:11

Trying to load a class from Parse , however the app crashes as soon I launch it! Here is the code:

 ListView listview;
List ob;
P         


        
相关标签:
2条回答
  • 2021-02-20 06:26

    you need assign your App file in manifest Open your manifest file and add this code in manifest file in application tag, first line android:name=".App"

    good luck in programming

    0 讨论(0)
  • 2021-02-20 06:29

    Based on your comment I'm guessing you haven't initialized Parse. http://docs.parseplatform.org/android/guide/#local-datastore

       public class App extends Application {
    
        @Override
        public void onCreate() {
            super.onCreate();
    
            // Enable Local Datastore.
            Parse.enableLocalDatastore(this);
    
            // Register any ParseObject subclass. Must be done before calling Parse.initialize()
            ParseObject.registerSubclass(YourClass.class);
    
            Parse.initialize(this, "APPLICATION_ID", "CLIENT_KEY");    
        }
    }
    

    Make sure you add your App class to the manifest

    0 讨论(0)
提交回复
热议问题