luke
luke

Reputation: 45

Android Studio error: cannot find symbol class SetContentView

I opened an existing project using Android Studio and when I want to run it in Android emulator, I face this error message:

Upvotes: 0

Views: 1686

Answers (1)

Zoe - Save the data dump
Zoe - Save the data dump

Reputation: 28267

If it is to set the layout of the file, it is done in onCreate(in activity, fragments are different) and it isn't a class:

@Override
public void onCreate(Bundle sis){
    super.onCreate(sis);
    setContentView(R.layout.layout);
}

If the class SetContentView is used for something else, or a custom class, see if it exists in your source files.

Upvotes: 1

Related Questions