<java.lang.NullPointerException: null cannot be ca...
# stackoverflow
u
java.lang.NullPointerException: null cannot be cast to non-null type com.google.android.gms.maps.SupportMapFragment Im working on a project where if a user clicks on a button in the mainactivity i will send them to the next activite which is google maps, but i get this exception This is the MainActivity private fun checkForPermissions() { val permission:String = Manifest.permission.ACCESS_FINE_LOCATION if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { when { ContextCompat.checkSelfPermission(applicationContext, permission) == PackageManager.PERMISSION_GRANTED -> {...