Android studio not recognize classes in manifest, findViewById, getApplicationContext,,,

Viewed 40

My android studio is crazy. Everything was working ok, but now in manifest I get error: class reference was not found.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.tr.s.app">

...

<activity android:name=".BaseActivity" />

In my activities I get: cannot resolve findViewById

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    purchaseButton = findViewById(R.id.bpay1);

And other stupid errors. Any ideas? I tried to clean project but errors still there. I can make apk even android studio showing error.

Any ideas what is wrong?

1 Answers

Go to File - Invalidate caches and restart. It will fix the issue

Related