title: Exception when trying to compile project inside Android studio
body: <p>I have the following error when I try to compile my project; any body knows what I can do with this error.</p>
  
  <blockquote>
    <p>FATAL EXCEPTION: main</p>
    
    <p>Process: com.bignerdranch.android.criminalintent, PID: 15284
                                                                                             java.lang.NoSuchMethodError: No static method
    getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)Landroid/graphics/Typeface;
    in class Landroid/support/v4/content/res/ResourcesCompat; or its super
    classes (declaration of
    'android.support.v4.content.res.ResourcesCompat' appears in
    /data/app/com.bignerdranch.android.criminalintent-sYwk5YXA0Ap8nyn-79YvKg==/base.apk)
                                                                                                 at
    android.support.v7.widget.TintTypedArray.getFont(TintTypedArray.java:119)
                                                                                                 at
    android.support.v7.widget.AppCompatTextHelper.updateTypefaceAndStyle(AppCompatTextHelper.java:208)
                                                                                                 at
    android.support.v7.widget.AppCompatTextHelper.loadFromAttributes(AppCompatTextHelper.java:110)
                                                                                                 at
    android.support.v7.widget.AppCompatTextHelperV17.loadFromAttributes(AppCompatTextHelperV17.java:38)
                                                                                                 at
    android.support.v7.widget.AppCompatTextView.(AppCompatTextView.java:81)
                                                                                                 at
    android.support.v7.widget.AppCompatTextView.(AppCompatTextView.java:71)
                                                                                                 at
    android.support.v7.widget.AppCompatTextView.(AppCompatTextView.java:67)
                                                                                                 at android.support.v7.widget.Toolbar.setTitle(Toolbar.java:753)
                                                                                                 at
    android.support.v7.widget.ToolbarWidgetWrapper.setTitleInt(ToolbarWidgetWrapper.java:261)
                                                                                                 at
    android.support.v7.widget.ToolbarWidgetWrapper.setWindowTitle(ToolbarWidgetWrapper.java:243)
                                                                                                 at
    android.support.v7.widget.ActionBarOverlayLayout.setWindowTitle(ActionBarOverlayLayout.java:621)
                                                                                                 at
    android.support.v7.app.AppCompatDelegateImplV9.onTitleChanged(AppCompatDelegateImplV9.java:631)
                                                                                                 at
    android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:328)
                                                                                                 at
    android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
                                                                                                 at
    android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                                                                                                 at
    com.bignerdranch.android.criminalintent.SingleFragmentActivity.onCreate(SingleFragmentActivity.java:21)
                                                                                                 at android.app.Activity.performCreate(Activity.java:6999)
                                                                                                 at android.app.Activity.performCreate(Activity.java:6990)
                                                                                                 at
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
                                                                                                 at
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
                                                                                                 at
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
                                                                                                 at android.app.ActivityThread.-wrap11(Unknown Source:0)
                                                                                                 at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
                                                                                                 at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                 at android.os.Looper.loop(Looper.java:164)
                                                                                                 at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                                                 at
    com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)</p>
  </blockquote>
  
  <p>Here is the part it says it is failing in the log</p>
  
  <pre><code>         public abstract class SingleFragmentActivity extends AppCompatActivity
  
                     {
                          protected abstract Fragment createFragment();//abstract method
                            @Override
                                   protected void onCreate(Bundle savedInstanceState) {
                                     super.onCreate(savedInstanceState);
                                          ***setContentView(R.layout.activity_fragment);***
                                     FragmentManager fm = getSupportFragmentManager();
                                   Fragment fragment = fm.findFragmentById(R.id.fragment_container);
                                     if (fragment == null) {
                                 fragment = createFragment();
                                   fm.beginTransaction()
                                  .add(R.id.fragment_container,fragment)
                                    .commit();
                                                          }
                                    }
  }
  </code></pre>