IllegalArgumentException: savedInstanceState Specified as Non-Null is Null

The issue is in the AppInjector. I used the google GitHubBrowser sample like you did and ran into this same error. I copied the code over to my project and let Android Studio convert it to Kotlin. When it did this it didn't properly specify the nullability of the savedInstanceState parameter which is what is causing the crash. Just make it optional like in the below code and it will work.

object AppInjector {
    fun init(app: App) {
        DaggerAppComponent.builder().application(app)
                .build().inject(app)
        app
                .registerActivityLifecycleCallbacks(object : Application.ActivityLifecycleCallbacks {
                    override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
                        handleActivity(activity)
                    }

                    override fun onActivityStarted(activity: Activity) {

                    }

                    override fun onActivityResumed(activity: Activity) {

                    }

                    override fun onActivityPaused(activity: Activity) {

                    }

                    override fun onActivityStopped(activity: Activity) {

                    }

                    override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {

                    }

                    override fun onActivityDestroyed(activity: Activity) {

                    }
                })
    }

    private fun handleActivity(activity: Activity) {
        if (activity is HasSupportFragmentInjector) {
            AndroidInjection.inject(activity)
        }
        (activity as? FragmentActivity)?.supportFragmentManager?.registerFragmentLifecycleCallbacks(
                object : FragmentManager.FragmentLifecycleCallbacks() {
                    override fun onFragmentCreated(fm: FragmentManager?, f: Fragment?,
                                                   savedInstanceState: Bundle?) {
                        if (f is Injectable) {
                            AndroidSupportInjection.inject(f)
                        }
                    }
                }, true)
    }
}

I had the exact same problem, you have to make nullable types here:

override fun onCreatePreferences(bundle: Bundle?, s: String?) {}

You may use null-coalescing operator ?:. The savedInstanceState will be passed to the super.onCreate method only if it is @NonNull, otherwise, if it is null, an empty Bundle() will be passed.

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState?: Bundle())
}