rafi0101 / Android-Room-Database-Backup

Simple tool to backup and restore your room database in Android
MIT License
241 stars 19 forks source link

Conflict with WorkManager #5

Closed truedem closed 3 years ago

truedem commented 3 years ago

Excellent product. However immediately after adding the code to the project - WorkManager code triggered this error:

Cannot access class 'com.google.common.util.concurrent.ListenableFuture'. Check your module classpath for missing or conflicting dependencies

The code which trigger it (and which was perfectly fine before):

WorkManager.getInstance(applicationContext).getWorkInfosForUniqueWork("MyWorkerNameString")

Adding

implementation "androidx.concurrent:concurrent-futures:1.1.0"

into build.gradle did not help. Adding

implementation 'com.google.guava:guava:29.0-android'

helped, but it's a sub-optimal solution. MinSDK 24, target 30, compile 30. It seems ExoPlayer library has/had similar issue:

https://stackoverflow.com/questions/64290141/android-studio-class-file-for-com-google-common-util-concurrent-listenablefuture

truedem commented 3 years ago

After moving to AS 4.2 (released yesterday) the issue has disappeared.