Cannot resolve symbol AppCompatActivity - Support v7 libraries aren't recognized?

后端 未结 25 1671
情深已故
情深已故 2020-12-07 18:39

I\'m trying to figure out why the heck my Android studio isn\'t recognizing the AppCompat v7 library correctly. The import statement below shows up as gray and says there\'s

25条回答
  •  春和景丽
    2020-12-07 19:08

    I changed from "... extends ActionBarActivity" to "... extends AppCompatActivity" and tried cleaning, restarting, Invalidate Caches / Restart and wasn't getting anywhere. All my versions were up to the latest.

    What finally solved it was making sure my import was correct:

    import android.support.v7.app.AppCompatActivity;
    

    For some reason it didn't get set up automatically like I was used to and I had to add it manually.

    Hope that helps someone!

提交回复
热议问题