Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling Hello World

Tags:

java

android

I'm working from a simple "hello world" tutorial and then modify it into the app I want. I started out with a hello world app added a button and now I'm tryin to respond to button events, etc.

But when I compile I'm getting the error: "package andriod.widget does not exist \n import andriod.widget.Button;"

The code is

package com.luke.bowls;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import andriod.widget.Button;

public class Bowls extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
                final Button button = (Button)findViewById(R.id.android_button);
                button.setOnClickListener(new OnClickListener() {
                    public void onClick(View v) {
                        // Perform action on clicks
                    }
                });
    }
}

It looks like a library reference problem but most of build code is hidden from me so I have no idea what to do to fix it.

like image 218
flukus Avatar asked May 15 '26 12:05

flukus


1 Answers

You've mis-spelt android...

like image 175
Chinmay Kanchi Avatar answered May 18 '26 03:05

Chinmay Kanchi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!