Error inflating class info.hoang8f.widget.FButton

前端 未结 5 834
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 14:36

Error Log:

10-26 12:22:33.144 26926-26926/? E/AndroidRuntime: FATAL EXCEPTION: main Process: ksmk

相关标签:
5条回答
  • 2020-12-11 14:51

    If you have updated your android studio version to 3.o then go to file -> Project Structure -> Project -> Change gradle plugin version to 2.3.0 and gradle version to 3.3

    I hope this helps

    0 讨论(0)
  • 2020-12-11 15:00

    Same Flat FButton theme can be found here:

    Use the library as a dependency https://github.com/jd-alexander/android-flat-button

    https://jitpack.io/#jd-alexander/android-flat-button/v1.1

     dependencies {
        implementation  'com.github.jd-alexander:android-flat-button:v1.1'
    

    }

    0 讨论(0)
  • 2020-12-11 15:02

    use this dependency this is will solve error

      implementation 'com.github.jd-alexander:android-flat-button:v1.1'
    

    use this in code for casting the button

     Button btn_CreateNewVideo;
     btn_CreateNewVideo = (FButton) findViewById(R.id.createnewvideo);
    
    0 讨论(0)
  • As of this time the problem occurs in android gradle plugin version 3.0.0. So just change the android gradle plugin version to 2.3.3. You can change it in build.gradle (Project level) file, like:

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.3.3'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    0 讨论(0)
  • 2020-12-11 15:11

    Another solution I have found

    Change for:

    Dependence {
          implementation 'info.hoang8f:android-segmented:1.0.6'
    }
    

    or

    You can change casting (FButton) to (Button) with same previous dependency

    0 讨论(0)
提交回复
热议问题