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.