简体   繁体   中英

Errors after opening new project in android studio

I've just opened a new project in android studio, and it's filled with errors, which, of course, I did not write - therefore, I have no idea what's wrong.

I am using the fullscreen activity option.

It goes like this - the usual thing:

    setContentView(R.layout.activity_main);

    final View controlsView = findViewById(R.id.fullscreen_content_controls);
    final View contentView = findViewById(R.id.fullscreen_content);

It cannot find the "R" thing, and gets even madder when I try to import the package, and then gives error on the "fullscreen_content" and "activity_main"

Sorry if this has been asked before, I'm a bit clueless, specially when I did nothing yet. Thanks a lot!

Try Build -> Rebuild Project
Also you can use console:

gradlew clean
gradlew assembleDebug

first of all you must be sure to have:

import android.R;

where is necessary, but if it doesn´t work, try:

Go to File -> Settings -> Compiler now check use external build

finally, Rebuild your project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM