title: android studio cannot find custom font file
body: <p>I am using a simple <code>TextView</code> in my activity and want to make it appear in a custom font 'Black Chancery'. I have put the <code>blkchcry.ttf</code> file at location <strong>app>src>main>assets>fonts>blkchcry.ttf</strong>. But, the android studio can't find that font. Here's my <code>AboutusActivity.java</code> code</p>
  
  <pre><code>public class AboutusActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_aboutus);
  
      TextView tx = (TextView)findViewById(R.id.title);
      Typeface custom_font = Typeface.createFromAsset(getAssets(),  "fonts/blkchcry.ttf");
      tx.setTypeface(custom_font);
      }
  }
  </code></pre>
  
  <p>and following is the <code>activity_aboutus.xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".AboutusActivity"&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;TextView
          android:id="@+id/title"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="About Rathi Classes"
          android:textSize="20sp"
          android:layout_margin="10dp"
          android:gravity="center_horizontal"/&gt;
  
      &lt;TextView
          android:layout_below="@+id/title"
          android:id="@+id/description"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:text="@string/about_text"
          android:textSize="20sp"
          android:layout_margin="10dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>
  and here is the logcat</p>
  
  <pre><code>Process: net.softglobe.rathiclasses, PID: 8894
  java.lang.RuntimeException: Unable to start activity ComponentInfo{net.softglobe.rathiclasses/net.softglobe.rathiclasses.AboutusActivity}: java.lang.RuntimeException: Font asset not found fonts/blkchcry.ttf
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
      at android.app.ActivityThread.-wrap12(ActivityThread.java)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:154)
      at android.app.ActivityThread.main(ActivityThread.java:6119)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
   Caused by: java.lang.RuntimeException: Font asset not found fonts/blkchcry.ttf
      at android.graphics.Typeface.createFromAsset(Typeface.java:206)
      at net.softglobe.rathiclasses.AboutusActivity.onCreate(AboutusActivity.java:17)
      at android.app.Activity.performCreate(Activity.java:6679)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) 
      at android.app.ActivityThread.-wrap12(ActivityThread.java) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) 
      at android.os.Handler.dispatchMessage(Handler.java:102) 
      at android.os.Looper.loop(Looper.java:154) 
      at android.app.ActivityThread.main(ActivityThread.java:6119) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 
  </code></pre>
  
  <p>I have tried cleaning the project but it failed to resolve the problem. Please help.</p>