title: Using androidx NotificationManagerCompat cannot resolve symbol 'from'
body: <p>Using <code>NotificationManagerCompat</code> in a Java class that extends <code>JobService</code>, I am getting 'cannot resolve from' error. Did 'Invalidate and Restart' but nothing happened.</p>
  <p>Here is my code:</p>
  <pre><code>import androidx.core.app.NotificationCompat;
  import androidx.core.app.NotificationManagerCompat;
  
  
  public class DailyNotificationJob extends JobService {
  
      JobParameters paramic;
      Boolean jobCancelled = false;
  
      @Override
      public boolean onStartJob(JobParameters params) {
          new postRequest().execute(propertyName);
          return true;
      }
  
      @Override
      public boolean onStopJob(JobParameters params) {
          jobCancelled = true;
          return false;
      }
  
      @SuppressLint(&quot;StaticFieldLeak&quot;)
      public class postRequest extends AsyncTask&lt;String,Void,String&gt; {
   
  //SOME CODE WAS REMOVED
  
          @SuppressLint(&quot;DefaultLocale&quot;)
          @Override
          protected void onPostExecute(String postDatareceived) {
  
                              // Create an explicit intent for an Activity in your app
                              Intent intent = new Intent(DailyNotificationJob.this, MainActivity.class);
                              intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
                              PendingIntent pendingIntent = PendingIntent.getActivity(DailyNotificationJob.this, 0, intent, 0);
  
                              NotificationCompat.Builder builder = new NotificationCompat.Builder(DailyNotificationJob.this, &quot;1&quot;)
                                      .setSmallIcon(R.drawable.rocket)
                                      .setContentTitle(&quot;Search Console Update&quot;)
                                      .setContentText(body)
                                      .setPriority(NotificationCompat.PRIORITY_DEFAULT)
                                      .setContentIntent(pendingIntent);
  
                              NotificationManagerCompat notificationManagerCompat = new NotificationManagerCompat.from(this);
                              notificationManagerCompat.notify((int) System.currentTimeMillis(), builder.build());
  
                          }
                      }
  
  
                  } 
                  jobFinished(paramic,true);
  
          }
  
      }
  
   
  
  }
  </code></pre>
  <p>notificationmanagercompact cannot resolve symbol from:<br />
  <a href="https://i.stack.imgur.com/1ptqv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1ptqv.png" alt="notificationmanagercompact cannot resolve symbol from" /></a></p>