Lottie-android: is it possible to use lottie with androidx support library ?

Created on 15 Aug 2018  路  7Comments  路  Source: airbnb/lottie-android

i use androidx support library and this is my app build.gradle:

`apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 28
defaultConfig {
applicationId "me.semycolon.infotorbat"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '28.0.2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// for using androidX commented
// implementation 'com.android.support.constraint:constraint-layout:1.1.2'
// implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
// testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
implementation 'androidx.recyclerview:recyclerview:1.0.0-rc01'
implementation 'androidx.annotation:annotation:1.0.0-rc01'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-rc01'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
//material-drawer
implementation 'com.mikepenz:materialdrawer:6.1.0-rc01'
//the core iconcis library (without any widgets)
implementation 'com.mikepenz:iconics-core:3.1.0-rc01'
//fonts
implementation 'com.mikepenz:fontawesome-typeface:5.0.13.0@aar'



//lottie  
implementation ('com.airbnb.android:lottie:2.6.0-beta19'){ exclude group: 'com.android.support' }

}
app crashes with this exeption: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.AppCompatImageView" on path: DexPathList...`

what's the solution to this ?

Most helpful comment

I'll release 2.6.0 without it and 3.0.0 with it

All 7 comments

Yes, I'll do an androidx migration soon.

I'll release 2.6.0 without it and 3.0.0 with it

Have you released 3.0.0 with an androidx support?

No they haven't. @gpeal would it be possible to release 3.0.0 beta versions at the same time as the 2.6.0 beta versions ?

@Anthony-Reboul @mehhrad I've decided to make it 2.7.0 and 2.8.0.
I publushed 2.7.0 as the last non-androidx release.
I started this migration last night on the gpeal--28 branch but it isn't building yet.

2.8.0 has been released with androidx.

@gpeal thanks

Was this page helpful?
0 / 5 - 0 ratings