Changing kotlinx coroutine version to 1.3.5 because of this : https://github.com/Kotlin/kotlinx.coroutines/issues/2049

This commit is contained in:
Oupson 2020-06-16 23:14:36 +02:00
parent f531b3ab78
commit 2ee343a403
3 changed files with 15 additions and 14 deletions

View File

@ -28,7 +28,8 @@ android {
}
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
// https://github.com/Kotlin/kotlinx.coroutines/issues/2049
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'

View File

@ -40,7 +40,7 @@ class ApngDecoder {
* Function called when something gone wrong.
* @param error The problem.
*/
fun onError(error: java.lang.Exception)
fun onError(error: Exception)
}
companion object {
@ -745,17 +745,16 @@ class ApngDecoder {
) {
GlobalScope.launch(Dispatchers.IO) {
try {
val drawable =
decodeApng(
context,
ByteArrayInputStream(
Loader.load(
url
)
),
speed,
config
)
val drawable = decodeApng(
context,
ByteArrayInputStream(
Loader.load(
url
)
),
speed,
config
)
withContext(Dispatchers.Main) {
imageView.setImageDrawable(drawable)
(drawable as? AnimationDrawable)?.start()

View File

@ -35,7 +35,8 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
// https://github.com/Kotlin/kotlinx.coroutines/issues/2049
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'