When you launch Android Studio, follow these steps to initialize the project:
: Set up an Android Virtual Device (AVD) via the Device Manager to test your app without a physical phone. 2. Creating a New Project
: Choose API 24 (Android 7.0) or higher to ensure compatibility with 90%+ of devices.
: Choose Empty Activity . This provides a clean slate. Configure Project : Name : "MySimpleApp" Language : Select Kotlin .
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val myButton: Button = findViewById(R.id.myButton) val myText: TextView = findViewById(R.id.textView) myButton.setOnClickListener { myText.text = "Hello, Kotlin!" } } } Use code with caution. Copied to clipboard 6. Running and Debugging : Click the Green Hammer icon to compile. Run : Click the Green Play icon to launch on the emulator.
: Defines app permissions and essential components. 4. Designing the User Interface (UI)
: Defines what happens when the button is pressed. Sample Code:
Build A Simple Android App With Kotlin May 2026
When you launch Android Studio, follow these steps to initialize the project:
: Set up an Android Virtual Device (AVD) via the Device Manager to test your app without a physical phone. 2. Creating a New Project Build A Simple Android App With Kotlin
: Choose API 24 (Android 7.0) or higher to ensure compatibility with 90%+ of devices. When you launch Android Studio, follow these steps
: Choose Empty Activity . This provides a clean slate. Configure Project : Name : "MySimpleApp" Language : Select Kotlin . : Choose Empty Activity
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val myButton: Button = findViewById(R.id.myButton) val myText: TextView = findViewById(R.id.textView) myButton.setOnClickListener { myText.text = "Hello, Kotlin!" } } } Use code with caution. Copied to clipboard 6. Running and Debugging : Click the Green Hammer icon to compile. Run : Click the Green Play icon to launch on the emulator.
: Defines app permissions and essential components. 4. Designing the User Interface (UI)
: Defines what happens when the button is pressed. Sample Code: