0

I have build a login and sign up app but getting an error while compiling.

It's a new kotlin class I have created. The error I am getting is

Unresolved reference: setDefaultFont

I have tried to get different ways of typing but no luck

package com.example.loginsignup

import android.app.Application

class MyApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        FontsOverride.setDefaultFont(this, "MONOSPACE", "Kol.ttf")
    }
}
barbsan
  • 3,418
  • 11
  • 21
  • 28
  • What is `FontsOverride`? Is this [code from this question](https://stackoverflow.com/questions/33923803/how-to-set-custom-font-for-a-whole-application-in-android) which relies on [this answer implementing FontsOverride](https://stackoverflow.com/a/16883281/760893)? – barbsan Sep 11 '19 at 12:52
  • Hi barbsan, the option that you gave me is in java i need to convert it somehow to kotlin, even if i copy and past: public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); FontsOverride.setDefaultFont(this, "DEFAULT", "raleway_regular.ttf"); // This FontsOverride comes from the example I posted above } } i get the same error, is there a setDefaultFront i can use in kotlin? – Lee-Martin Day Sep 11 '19 at 13:32

0 Answers0