title: cannot resolve symbol SmsManager.getDefault()
body: <pre><code>package com.soft.mash.contactmanager;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.telephony.SmsManager;
  import android.widget.Toast;
  
  public class SendSms extends Activity {
  
      SmsManager smsManager ;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
      }
  
      public boolean SendMessage(String number, String textMessage) {
          try {
              smsManager = (SmsManager) new SmsManager.getDefault();
              smsManager.sendTextMessage(number, null, textMessage, null, null);
              return true;
          }catch (Exception e)
          {
              Toast.makeText(getApplicationContext(),"SMS sending failed",Toast.LENGTH_SHORT).show();
              e.printStackTrace();
              return false;
          }
      }
  }
  </code></pre>
  
  <p>Why </p>
  
  <pre><code>cannot resolve symbol 'getDefault()'
  </code></pre>
  
  <p>is occurring here? </p>
  
  <p>In one similar StackOverflow question's answer advised to "Invalidate Cache and restart". But not solving my problem here. </p>