Android TextInputField Inflator Error

后端 未结 13 1340
野的像风
野的像风 2020-12-03 06:55

Had a crash while trying to use the new TextInputField for Android and wanted to share my solution.

Trying the new TextInputField in the android appcomp

13条回答
  •  情书的邮戳
    2020-12-03 07:33

    just to be clear as of Android Studio 3.* this is now changed to

    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    

    (if this goes red a squiggly when you add it accept the version Android Studio wants to suggest)

    this needs to be inside the

     dependencies {}
    

    section of build.gradle (Module:app) so it looks like this

    dependencies {
        ...
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support:design:27.1.1'
    }
    

    then hit sync now

提交回复
热议问题