我需要在我的程序中使用firebase ui auth…
//选择身份验证提供程序
list providers=数组.aslist(
新建authui.idpconfig.emailbuilder().build(),
新建authui.idpconfig.googlebuilder().build());

// Create and launch sign-in intent
caller.startActivityForResult(
        AuthUI.getInstance()
                .createSignInIntentBuilder()
                .setAvailableProviders(providers)
                .build(),
        RC_SIGN_IN);`

功能很好(我在我的主要活动中称之为)。
但是,当我只选择:AuthUI.IdpConfig.EmailBuilder()应用程序崩溃,因为有一些问题膨胀XML…
错误代码:
Process: com.superena.superenaactivity, PID: 6516
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.superena.superenaactivity/com.firebase.ui.auth.ui.email.EmailActivity}: android.view.InflateException: Binary XML file line #24: Binary XML file line #24: Error inflating class android.support.design.widget.TextInputLayout
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: android.view.InflateException: Binary XML file line #24: Binary XML file line #24: Error inflating class android.support.design.widget.TextInputLayout
     Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.support.design.widget.TextInputLayout
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
        at android.view.LayoutInflater.createView(LayoutInflater.java:647)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
        at com.firebase.ui.auth.ui.email.CheckEmailFragment.onCreateView(CheckEmailFragment.java:89)
        at android.support.v4.app.Fragment.performCreateView(Fragment.java:2335)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1423)
        at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1754)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1822)
        at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
        at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2591)
        at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2378)
        at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2333)
        at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2240)
        at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3243)
        at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3195)
        at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:195)
        at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:596)
        at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:177)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1334)
        at android.app.Activity.performStart(Activity.java:7029)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2741)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
06-27 12:54:24.320 6516-6516/com.superena.superenaactivity E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: java.lang.NoSuchFieldError: No static field error_color_material of type I in class Landroid/support/v7/appcompat/R$color; or its superclasses (declaration of 'android.support.v7.appcompat.R$color' appears in /data/app/com.superena.superenaactivity-reFM-WL6EH7D2KJRxYTXFw==/split_lib_slice_2_apk.apk)
        at android.support.design.widget.TextInputLayout.setErrorEnabled(TextInputLayout.java:654)
        at android.support.design.widget.TextInputLayout.<init>(TextInputLayout.java:257)
        at android.support.design.widget.TextInputLayout.<init>(TextInputLayout.java:187)
            ... 40 more

有了这两个选项,它工作得很好;只有newAuthUI.IdpConfig.EmailBuilder().build());不起作用,如果有人能帮我,请

最佳答案

我也面临同样的问题。加上这个就解决了

compile 'com.android.support:design:28.0.0'

应用级gradle文件的依赖关系。
android - AuthUI.IdpConfig.EmailBuilder()扩大 View 错误-LMLPHP

10-04 12:11