title: Cannot call method from another Module : Android studio
body: <p>I have two modules in android studio</p>
  
  <ol>
  <li>Standard android <strong>app module</strong> </li>
  <li><strong>domain module</strong> </li>
  </ol>
  
  <p>The domain module in been added to both <code>settings.gradle</code> and <code>build.gradle</code> </p>
  
  <p><code>include ':mobile', ':domain'</code> &amp; 
   <code>compile project(':domain')</code> respectively like this</p>
  
  <p>Inside domain module I have a class like this :</p>
  
  <pre><code>public class DomainUtils {
  
      Context mContex;
      public DomainUtils(Context context){
          this.mContex = context;
      }
      public  void toast(String string){
          Toast.makeText(mContex, string,Toast.LENGTH_LONG).show();
      }
      public String returnHi(){
          return "hi";
      }
  }
  </code></pre>
  
  <p>But when i try to call     <code>new DomainUtils(context).toast("hi");</code></p>
  
  <p>from a class <strong>inside App module</strong> :</p>
  
  <ol>
  <li>The method inside DomainUtils does not execute</li>
  <li>Program flow does not continue to next line in the calling class ( program flow stops" </li>
  <li>I do not see any error logs in logcat.</li>
  </ol>
  
  <p>------------<strong>BUT</strong> ----------</p>
  
  <p>When I run the method <code>returnHi()</code> It works fine .</p>