0

I am new with JavaScript and Developement on Android. I installed Eclipse but I can't even run the "Hello World" program, included when you created a new project !

Please help me, I spent the two last days installing this IDE (even tried Android Studio), but there is always the same error :

Could not find Chwet.apk!

And there seems to be an error with the "R", like in setContentView(R.layout.activity_main)

Here is my code :

package com.example.chwet;

    import android.os.Bundle;
    import android.app.Activity;
    import android.view.Menu;

    public class MainActivity extends Activity {
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
        }

        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            // Inflate the menu; this adds items to the action bar if it is present.
            getMenuInflater().inflate(R.menu.main, menu);
            return true;
        }
    }
M D
  • 47,665
  • 9
  • 93
  • 114

3 Answers3

1

Look at following tutorial to get start with Android application development.

Hello world example.

itzmebibin
  • 9,199
  • 8
  • 48
  • 62
saa
  • 1,538
  • 2
  • 17
  • 35
  • You are welcome. Book mark that web site. It will be useful for you to understand Android basic concepts. Happy Coding – saa Jan 31 '14 at 11:19
0

Press Ctrl+shift+o to add missing packages. It will automatically remove your errors.

vahid abdi
  • 9,636
  • 4
  • 29
  • 35
saa
  • 1,538
  • 2
  • 17
  • 35
0

Instead of importing android R class , import R class with your package name.

Neha Agarwal
  • 622
  • 7
  • 24