Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Trevor Szentmiklosy
Trevor Szentmiklosy
7,473 Points

its saying it doesn't recognize 'var'

I think my android studio is running java not kotlin but I dont know where to download kotlin. please help! also it looks like my android studio is a little different and so is the code, do i need to change any thing?

this my code

public class FunFactsActivity extends AppCompatActivity {
    // Declare our View variables
    private var factTextView: TextView? = null
    private var showFactButton: Button? = null

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fun_facts);
    }
}

1 Answer

Trevor Szentmiklosy
Trevor Szentmiklosy
7,473 Points

never mind my program apparently just needed to update...