0

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.

Artem Mostyaev
  • 3,874
  • 10
  • 53
  • 60
Mohamed Ibrahim
  • 3,714
  • 2
  • 22
  • 44

2 Answers2

0

Try update "build.gradle (Module.app)" like this:

...
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:support-annotations:23.2.1'
    compile 'com.android.support:design:23.2.1'
}
...

and resync project. It helped me

0

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

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

and it worked.

Mohamed Ibrahim
  • 3,714
  • 2
  • 22
  • 44