Member-only story
Common Mistakes Made by Junior Android Developers
3 min readMay 24, 2025
Stepping into the world of Android development can be both exciting and overwhelming. Junior developers, especially those fresh out of bootcamps or universities, often make similar mistakes as they start their journey.
1. Ignoring Lifecycle Awareness
Mistake: Updating UI or triggering actions outside the correct lifecycle method. ⛔️
class HomeActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
startObservingLiveData() // ⚠️ Called too early
}
}
Better Approach: ☑️
class HomeActivity : AppCompatActivity() {
override fun onStart() {
super.onStart()
startObservingLiveData() // ✅ Safer here
}
}
2. Not Using ViewBinding or Jetpack Compose Properly
Mistake: Relying on findViewById
instead of ViewBinding. ⛔️
val button = findViewById<Button>(R.id.btnLogin)
button.setOnClickListener {
// Do something 👩🏼💻
}
Better Approach with ViewBinding: ☑️
ViewBinding is a feature in Android that makes it easier and safer to access views (like buttons, text fields, etc.)…