acefalobi / android-stepper

A library for creating a wizard-like step-through user interface that uses navigation components and menus for displaying steps with advanced customization.
Apache License 2.0
325 stars 38 forks source link

Error: java.lang.NoSuchMethodError: No virtual method set TextAppearence #12

Closed fsanchezi closed 3 years ago

fsanchezi commented 3 years ago

I am trying to use your library in my project, but I have the following error.

Screenshot

Layout code:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
    tools:context=".views.ui.planner.NewPlannerActivity">

<com.google.android.material.appbar.AppBarLayout
    android:id="@+id/appbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay"
    app:elevation="0dp"
    app:layout_constraintTop_toTopOf="parent">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:layout_weight="1"
        tools:title="Step 1" />

</com.google.android.material.appbar.AppBarLayout>

<View
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:background="@color/inspectionColorPrimary"
    app:layout_constraintBottom_toTopOf="@id/guideline_stepper_middle"
    app:layout_constraintTop_toBottomOf="@id/appbar" />

<androidx.cardview.widget.CardView
    android:id="@+id/card_stepper"
    style="@style/Stepper.CardView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="32dp"
    app:layout_constraintTop_toBottomOf="@id/appbar"
    tools:layout_editor_absoluteX="32dp">

    <com.aceinteract.android.stepper.StepperNavigationView
        android:id="@+id/stepper"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="16dp"
        android:paddingTop="20dp"
        android:paddingEnd="16dp"
        android:paddingBottom="20dp"
        app:stepperIconSize="20dp"
        app:stepperItems="@menu/menu_new_planner_stepper"
        app:stepperTextColor="@android:color/black"
        app:stepperTextSize="12sp"
        app:stepperTextAppearance="@style/Stepper.Label"
        app:stepperType="@string/stepper_type_tab"
        app:stepperWidgetColor="@color/inspectionColorAccent" />

</androidx.cardview.widget.CardView>

<androidx.fragment.app.FragmentContainerView
    android:id="@+id/frame_stepper"
    android:name="androidx.navigation.fragment.NavHostFragment"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintTop_toBottomOf="@id/guideline_stepper_middle"
    app:navGraph="@navigation/nav_planner_stepper" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/button_next"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/fab_margin"
    android:contentDescription="@string/lbl_next_step"
    android:src="@drawable/ic_visibility_off_black_24dp"
    app:backgroundTint="@color/inspectionColorAccent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:tint="@android:color/white" />

<View
    android:id="@+id/guideline_stepper_middle"
    android:layout_width="match_parent"
    android:layout_height="1dp"
    app:layout_constraintBottom_toBottomOf="@id/card_stepper"
    app:layout_constraintTop_toTopOf="@id/card_stepper" />

</androidx.constraintlayout.widget.ConstraintLayout>
acefalobi commented 3 years ago

Can I see @style/Stepper.Label?

mspnr commented 3 years ago

From the error text looks the same as in issue https://github.com/acefalobi/android-stepper/issues/15 Can be closed as a duplicate.

acefalobi commented 3 years ago

Yes, you're right