0

I am using this Github project. I am trying to use the relative layout it provided but I'm encountering rendering errors

"The following classes could not be instantiated: - com.software.shell.fab.ActionButton (Open Class, Show Exception, Clear Cache)"

Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details java.lang.VerifyError: Expecting a stackmap frame at branch target 12 Exception Details: Location: com/software/shell/fab/ActionButton.isHidden()Z @5: if_icmpne Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2ab6 022b 07a0 0007 04a7 0004 03ac   at java.lang.Class.getDeclaredConstructors0(Class.java:-2)   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658)   at java.lang.Class.getConstructor0(Class.java:3062)   at java.lang.Class.getConstructor(Class.java:1812)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:756)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:728)   at android.view.LayoutInflater.inflate(LayoutInflater.java:492)   at android.view.LayoutInflater.inflate(LayoutInflater.java:373) Copy stack to clipboard

I have also provided my xml layout and build gradle file in case I did something wrong. Thanks for any help.

xml layout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/theLayout"
   
    android:background="#0c2d34"
    xmlns:fab="http://schemas.android.com/apk/res-auto">

    <ListView
        android:layout_width="360dp"
        android:layout_height="430dp"
        android:id="@+id/listView"
        android:divider="@android:color/transparent"
        android:dividerHeight="10dp"
        android:scrollbars="none"
        android:layoutAnimation = "@anim/my_layout_animation"

        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" />

    <ImageButton
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/imageButton"
        android:layout_below="@+id/listView"

        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:background="@drawable/timerbutton"

        android:onClick="goToFillOut"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/no_available_alarms"
        android:id="@+id/emptyTextViewForList"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:textAlignment="center"
        android:textSize="18sp"/>

    <com.software.shell.fab.ActionButton
        android:id="@+id/action_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_marginRight="@dimen/fab_margin"
        android:layout_marginBottom="@dimen/fab_margin"
        />


</RelativeLayout>

build gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "21.1.2"

    defaultConfig {
       
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.github.shell-software:fab:1.1.2'
}

fab build.gradle

android {

    compileSdkVersion 22
    buildToolsVersion "21.1.2"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
    }

}

dependencies {
    compile 'org.slf4j:slf4j-api:1.7.9'
    compile 'com.github.shell-software:viewmover:1.1.0'
    compile 'com.github.shell-software:uitools:1.1.0'
}
Community
  • 1
  • 1
leonardo
  • 93
  • 2
  • 10

1 Answers1

0

The stacktrace suggests it's not from your running app, but from your IDE's visual designer. Some widgets may not work (won't show up) in visual designer so you may fill the bug report if this is the case.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141