I have problem with calling and running the methods. May be is referred to the one thing in logcat: A resource failed to close call. but this is a new error in my projects and I don`t have it before. here is my code below :
import android.os.Bundle
import androidx.activity.ComponentActivity
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
main4("456")
}
fun main4(ds:String):String{
print(ds)
return ds
}
}
I need to print ds as you can see but it doesn`t show anything. thanks a lot for your attention.
you can adjust the main4 function as follow:
this way you can see the message in the standard output stream with