Skip to content
Advertisement

This is my first Android program using Java, I am trying to use a alert dialog, but the app keeps on closing

So belove is my code, in the design i have one textview with the ID t. I am using android 5.0 to build and i have the required SDK(android 5 and 5.1).

JavaScript

Sorry if my question looks silly 🙂 Thank you

Advertisement

Answer

call TextView t1=findViewById(R.id.t); after setContentView(R.layout.activity_main);

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement