0

I have a problem: when I add the com.chauthai.swipereveallayout.SwipeRevealLayout library to the layout, my android studio does not draw the screen with the elements. Who knows how to solve this problem?

https://i.stack.imgur.com/DRVMQ.png

Text error:

The following classes could not be instantiated: - com.chauthai.swipereveallayout.SwipeRevealLayout (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. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.ClassNotFoundException: android.support.v4.widget.ViewDragHelper$Callback Copy stack to clipboard

Code gradle:

plugins {
    id 'com.android.application'
}

android {
    namespace 'com.example.justwork'
    compileSdk 32

    defaultConfig {
        applicationId "com.example.justwork"
        minSdk 22
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.6.0'
    implementation 'com.google.android.material:material:1.7.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    implementation 'com.intuit.sdp:sdp-android:1.1.0'
    implementation 'com.intuit.ssp:ssp-android:1.1.0'

    implementation 'de.hdodenhof:circleimageview:3.1.0'

    implementation 'com.github.Android-library-copy-dependencies:SwipeRevealLayout:1.5.2'
}

Most likely View.isInEditMode() will not help here, so far this is just my guess from what I tried to do.

  • if you are using studio dolphin+ on windows or mac, then it might be related to this https://stackoverflow.com/questions/73772547/android-studio-dolphin-2021-3-1-does-not-show-layout-preview – Nilabja Jan 17 '23 at 09:15
  • @Nilabja: Unfortunately, nothing helped me with this link. And so far I have not found a solution how to fix it. – IdeaSoftWorks Jan 17 '23 at 19:15
  • 1. you have not posted your code in .xml file, only then you might receive answers, currently very few people will try to reproduce your error, 2. try downloading android studio chipmunk, or try using linux 3. the library is not maintained, so it may be incompatible – Nilabja Jan 18 '23 at 09:18
  • Does this answer your question? [Android Studio Dolphin | 2021.3.1 does not show layout preview](https://stackoverflow.com/questions/73772547/android-studio-dolphin-2021-3-1-does-not-show-layout-preview) – Nilabja Jan 18 '23 at 12:54
  • @Nilabja: I left the details, you can see – IdeaSoftWorks Jan 18 '23 at 17:32

1 Answers1

0

download android studio Flamingo beta, the issue seems to be fixed Flamingo download website.

Nilabja
  • 4,206
  • 5
  • 27
  • 45