How to Make an Android App for Beginners

Treehouse · 6.1M views · 2018 · 19:18

Open on YouTube

Software practice, open source & careersSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they were following when their first Android Studio and Kotlin project hit errors, so it shows up mostly in beginner debugging questions.

Recommended by 1 people across 1 different months, 2018 to 2020.

What it is

A Treehouse beginner tutorial that walks through installing Android Studio and building a simple Kotlin app, a dice-style randomizer with a button, a seek bar and a text view. It assumes no prior Android or programming experience.

What people said

Recommends Gabriel · 2020-08 · Stack Overflow · on “Why i am getting this error: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to android.widget.TextView?”

I'm just starting to working with Android studio and i was following this tutorial on youtube : [this video] But for some reason i'm getting this error: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to android.widget.TextView I searched for the same error and it looks like someone had the same problem because he was using the ConstraintLayout and the TextView with the same ID. But this is not my case: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android=" [LINK] " xmlns:app=" [LINK] " xmlns:tools=" [LINK] " android:id="@+id/resultsTextView" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="

Cites marshmallow · 2018-12 · Stack Overflow · on “seekbar.progress needs expected type boolean”

Im new to kotlin and i am trying to follow this tutorial: [this video] have a problem where the line val rand = Random().nextInt(seekBar.progress) gives a error Expected a value of type boolean Full code: package pro.bwac.randomizer import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.widget.Button import android.widget.SeekBar import android.widget.TextView import java.util.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val rollButton = findViewById<Button>(R.id.RollButton) val seekBar = findViewById<SeekBar>(R.id.seekBar) val textView =

Cites Casey · 2019-01 · Stack Overflow · on “First app - Random.nextInt() unresolved reference”

I have followed this tutorial for building an android app. [this video] It goes well up until the end, where we generate a random val using Random.nextInt() . In Android Studio (3.3), I get an error : an unresolved reference to nextInt. I have made sure I am using the right spelling. This program uses Kotlin, and I even imported java.util.* to get the Random library imported. Please help me out, it is very discouraging not being able to get such a simple application built. Thanks.

Cites Mikkel Priisholm · 2019-01 · Stack Overflow · on “Android Studio cannot resolve symbol text turns red”

I know that if you write something wrong in code you get a red underline. My problem is that the whole word turns red and I get the error "Cannot resolve symbol '(and then whatever the code is)'" when I hold the mouse over it. I have downloaded Java just to see if it were the problem. I also followed this tutorial [LINK] on how to download Android studio. The program I made is from this tutorial [this video] on Youtube. The path text in the top gets a red underline. I don't know if it helps but i'm using Windows 10 and Android Studio 3.3 Here you can see my code turning red: [LINK]

Cites Curtis Poe · 2019-10 · Stack Overflow · on “Android (Kotlin): text now showing after I set it”

Playing around with Android and following this simple introduction [this video] but I can't get the line resultsTextView.text = rand.toString() to trigger. Not sure what I'm missing. The main Kotlin code looks like this ( MainActivity.kt ): package io.github.ovid.randomizer import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Button import android.widget.SeekBar import android.widget.TextView import kotlin.random.Random class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val rollButton = findViewById<Button>(R.id.rollButton) val resultsTex