首页 > 解决方案 > 实施国家以推动活动

问题描述

我正在尝试在我的项目中实施:https ://github.com/hbb20/CountryCodePickerProject ,以在微调器中显示所有国家/地区的列表。

我在 build.gradle (app) 中添加了代码:

implementation 'com.hbb20:ccp:2.3.4'

之后,我将它添加到 XML 文件(布局)中,因为它在https://github.com/hbb20/CountryCodePickerProject/wiki/Use-as-a-Country-Selector上声明:

<com.hbb20.CountryCodePicker
        android:id="@+id/country"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="28dp"
        app:ccp_showFullName="true"
        app:ccp_showNameCode="false"
        app:ccp_showPhoneCode="false"
        app:layout_constraintTop_toTopOf="parent"
        tools:layout_editor_absoluteX="0dp" />

当我运行我的应用程序时,它看起来像:

在此处输入图像描述

但是,当我单击微调器以选择国家/地区应用程序崩溃时,在 Logcat 中出现错误:

2019-12-27 14:47:00.619 13536-13536/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.cryptowallet, PID: 13536
    android.view.InflateException: Binary XML file line #78: Binary XML file line #78: Error inflating class com.futuremind.recyclerviewfastscroll.FastScroller
    Caused by: android.view.InflateException: Binary XML file line #78: Error inflating class com.futuremind.recyclerviewfastscroll.FastScroller
    Caused by: java.lang.reflect.InvocationTargetException

标签: javaandroid

解决方案


推荐阅读