Mohamed Ibrahim Mohamed Ibrahim - 1 month ago 19
Android Question

The following classes could not be instantiated: - android.support.design.widget.FloatingActionButton

I receive the following error


The following classes could not be instantiated: -
android.support.design.widget.FloatingActionButton


Lately that problem appears every time I opened new project in Android Studio,
I tried many solutions written here, like ..


  • Rebuild and re-sync project with gradle option.

  • Change Android rendering version.

  • Checking updates and install latest version.



None of those solutions work for me.

Answer

I found a solution which is changing project theme in res/values/styles.xml

<stylename="AppTheme"parent="Theme.AppCompat.Light.DarkActionBar">

and it worked.

Comments