I’m trying dynamically set a text to the layout.
Example code:
override fun onCreate(savedInstanceState: Bundle?){
super.onCreate(savedInstanceState)
val binding : StartBinding = setContentView(MainActivity(), R.layout.start)
binding.textView.setText("Hello World")
}
Gradle build ends ok but application crashes when I open this page at my mobile phone with this error:
[qarth_debug:] get PatchStore::createDisableExceptionQarthFile method fail.
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference
How to repair it?