android - Custom Application class onCreate() never called -


i'm trying initialize parse on custom application class:

import android.app.application; import android.util.log;  import com.parse.parse; import com.parse.parseexception; import com.parse.parseinstallation; import com.parse.savecallback;  public class someapplication extends application {      @override     public void oncreate() {         super.oncreate();         initializeparse();     }      private void initializeparse() {         parse.setloglevel(parse.log_level_verbose);         parse.initialize(new parse.configuration.builder(this)                 .applicationid("##########")                 .clientkey("############")                 .server("https://#####.com/parse/")                 .build()         );         parseinstallation installation = parseinstallation.getcurrentinstallation();         installation.saveinbackground(new savecallback() {             @override             public void done(parseexception e) {                 // here             }         });     }  } 

and declare application in androidmanifest.xml:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.test.someproject">      <uses-permission android:name="android.permission.internet" />      <application         android:name=".someapplication"         android:allowbackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:supportsrtl="true"         android:theme="@style/apptheme">         <activity android:name=".mainactivity">             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>         <activity android:name=".anotheractivity"/>     </application>  </manifest> 

but custom application never called. tried put logs , break points on oncreate method, clean project, rebuild project, close , re-open android studio, uninstall , reinstall app , nothing ... so, need help.

thanks!

disable instant run, clean build, rebuild project , run again. had same issue. disabling instant run worked me. weird application class not getting called. happened.


Comments

Popular posts from this blog

Formatting string according to pattern without regex in php -

c - zlib and gdi32 with OpenSSL? -

java - inputmismatch exception -