AbedElazizShe / LightCompressor

A powerful and easy-to-use video compression library for android uses MediaCodec API.
Apache License 2.0
518 stars 117 forks source link

cannot access CoroutineScope #40

Closed mishra0007 closed 3 years ago

mishra0007 commented 3 years ago

I am getting an error on importing this library

error: cannot access CoroutineScope VideoCompressor.start(String.valueOf(contentURI), "//sdcard//Download//", new CompressionListener() {

the class file for kotlinx.coroutines.CoroutineScope not found

Need some help

AbedElazizShe commented 3 years ago

Thank you for opening this issue. Please follow this section https://github.com/AbedElazizShe/LightCompressor#usage and https://github.com/AbedElazizShe/LightCompressor#how-to-add-to-your-project. Let me know if you did and still not working.

mishra0007 commented 3 years ago

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Version.coroutines}" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Version.coroutines}" On importing these two, I am getting an error which say Could not get unknown property 'Version' for the object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

AbedElazizShe commented 3 years ago

Replace that part with the most recent version.

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'

mishra0007 commented 3 years ago

Replace that part with the most recent version.

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'

it worked fine