urbanairship / android-library

Urban Airship Android SDK
Other
109 stars 123 forks source link

java.lang.NoSuchMethodError: No virtual method isOpenInternal()Z in class Landroidx/room/RoomDatabase; #238

Closed odemolliens closed 5 months ago

odemolliens commented 5 months ago

❗For how-to inquiries involving Airship functionality or use cases, please contact (support)[https://support.airship.com/].

Preliminary Info

What Airship dependencies are you using?

"@ua/react-native-airship": "17.3.0"

What are the versions of any relevant development tools you are using?

Android Studio/Xcode/Visual Studio/IntelliJ

Report

What unexpected behavior are you seeing?

App crash at launch with the last SDK version

What is the expected behavior?

App doesn't crash

What are the steps to reproduce the unexpected behavior?

Upgrade to last available react native SDK, launch the app, it's crashing

Do you have logging for the issue?

FATAL EXCEPTION: UrbanAirship#2
04-11 12:27:13.235 E/AndroidRuntime(29477): Process: xxxx, PID: 29477
04-11 12:27:13.235 E/AndroidRuntime(29477): java.lang.NoSuchMethodError: No virtual method isOpenInternal()Z in class Landroidx/room/RoomDatabase; or its super classes (declaration of 'androidx.room.RoomDatabase' appears in /data/app/~~0cMCyvGQQBdEGI1P86zS2g==/xxx-7CFG0HKx0aMH662iL0Ro4g==/base.apk!classes3.dex)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at androidx.room.CoroutinesRoom$Companion.execute(CoroutinesRoom.kt:56)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at androidx.room.CoroutinesRoom.execute(Unknown Source:2)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at com.urbanairship.cache.CacheDao_Impl.deleteExpired(CacheDao_Impl.java:140)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at com.urbanairship.cache.AirshipCache.deleteExpired$urbanairship_core_release(AirshipCache.kt:84)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at com.urbanairship.cache.AirshipCache.deleteExpired$urbanairship_core_release$default(AirshipCache.kt:79)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at com.urbanairship.cache.AirshipCache$1.invokeSuspend(AirshipCache.kt:43)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at com.urbanairship.util.AirshipThreadFactory$1.run(AirshipThreadFactory.java:50)
04-11 12:27:13.235 E/AndroidRuntime(29477):     at java.lang.Thread.run(Thread.java:1012)
04-11 12:27:13.235 E/AndroidRuntime(29477):     Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@2b6872c, java.util.concurrent.ThreadPoolExecutor@cef25f5[Running, pool size = 5, active threads = 1, queued tasks = 0, completed tasks = 20]]

It's looks like there is missing library androidx.room.database

Ulrico972 commented 5 months ago

Hello,

That error could be due to an old version of room declared in your project or another third-party. Could you please share your build.gradle files and the result of the following command: ./gradlew app:dependencies ?

odemolliens commented 5 months ago

Hello @Ulrico972,

Good point! Thanks to your feedback, I have been able to solve the issue! 👏