2

I just made a Hello Word application Android. But, I got this errors:

Error(3, 19) package android.app does not exist

Error(4, 18) package android.os does not exist

Error(6, 33) cannot find symbol
symbol: class Activity

Error(11, 26)cannot find symbol
symbol: class Bundle

Error(12, 9)cannot find symbol
symbol  : variable super

Error(13, 9)cannot find symbol
symbol  : method setContentView(int)

Error(10, 5)method does not override or implement a method from a supertype.

When I double click error, im get this:

package com.example.Hello;

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

public class MyActivity extends Activity {
    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

2

I have the same problem. I can fixed it from this thread, some time intelliJ has missing path/file when adding SDKs

  1. Select your android project
  2. press ctrl +alt + shift + S
  3. Select SDK from the project settings
  4. Check the files under the class path tab
  5. There must be android.jar ,res ,annotations.jar Probably there should be missed one or several files in step 5. Then,
  6. Go to Android SDK home path field and add your SDK folder again files even though you have all the jars and still you are getting the error ,then remove all the jars from the class path and add them again ( like in step 6).
  7. Build menu -Rebuild your project.
Community
  • 1
  • 1
thunya
  • 21
  • 2
  • In addition to this answer: also make sure that under project settings > modules > Android SDK points to the right SDK :), this setting can get messed up when using version control. – Bart Burg Dec 18 '14 at 08:29