When I use implementation \'com.google.firebase:firebase-inappmessaging-display:17.2.0\'
in my app/build.gradle
, I get this error:
I encountered the same problem. I added the line below
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
This works but I encountered another issue- Cannot fit requested classes in a single dex file (# methods: 89411 > 65536)
To resolve this error make sure to enable multiDex as below
defaultConfig {
applicationId "com.techweezy.smartsync"
minSdkVersion 19
targetSdkVersion 29
versionCode 5
versionName "1.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true //added this line
}
Then finally add the below lines.
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
implementation 'androidx.multidex:multidex:2.0.1'
I found the solution at How to solve Program type already present: com.google.common.util.concurrent.ListenableFuture?. user2297550 said:
I merely added
implementation 'com.google.guava:guava:27.0.1-android'
at the end of my app gradle file and the error went away.
That was the solution for me. Now I have this and my app compiles correctly:
implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
implementation 'com.google.guava:guava:27.0.1-android'