Comments (6)
code is compiling fine using the gradle assemble task
That's the critical part. This means that our library provides all the information needed for the compiler (and therefore, ideally, the IDE).
This should be filed to https://youtrack.jetbrains.com/newIssue?project=KTIJ. Please include the build number of the IDE and which configs you have set in Settings → Languages & Frameworks → Kotlin
.
from kotlinx.coroutines.
I followed your instructions exactly, but the issue didn't reproduce: Dispatchers.Default
is resolved properly. Please ensure that the Kotlin version is at least 1.9.0 (but preferably, 1.9.21), and also try to build the project. If compilation doesn't report any errors, this means that the problem is on the side of Android Studio. If your project doesn't build with 1.8.0 but builds with 1.7.3, please provide a reproducer.
from kotlinx.coroutines.
Having this same bug here, using kotlin 1.9.22
works fine for Android and JVM, but as soon as I had anything native, it starts throwing this error.
from kotlinx.coroutines.
@cunhap, please read my message above.
from kotlinx.coroutines.
I have. I am using the latest IntellJ Ultimate, not Android Studio. It also happens when I add the js
target. I think it's an IDE issue here as well, the code is compiling fine using the gradle assemble task. Any suggestions @dkhalanskyjb ? It's harder to code without the IDE accessing the information properly.
from kotlinx.coroutines.
Closing the issue for now, as it seems like it's not related to the coroutines library. If we receive some new information about the problem, we'll reopen the issue.
from kotlinx.coroutines.
Related Issues (20)
- 1.9.0-RC test task:compileDemoDebugUnitTestKotlin error Suspension functions can only be called within coroutine body. HOT 1
- Improve invokeOnCompletion and invokeOnCancellation API HOT 1
- Mention `testScope.backgroundScope` in `UncompletedCoroutinesError`
- Allow `Dispatchers.Unconfined` to use the event loops as time sources
- Add optional support for Micrometer Context Propagation
- `withContext` may execute code in the wrong context if the `coroutineContext` misleads it HOT 3
- SharedFlow doesn't have same parameters as in constructor function HOT 2
- Consider deprecation cycle for `CoroutineDispatcher.invoke` HOT 6
- How to prevent a SharedFlow collect values when the activity resumes? HOT 1
- Consider discouraging `CoroutineStart.LAZY`
- Some problem about `addLast` in LockFreeTaskQueue HOT 1
- Maybe it's reasonable to recommend wrapping a `callbackFlow` initialization into `try`-`finally`? HOT 4
- Dispatcher failures may leave coroutines uncompleted HOT 1
- `DelayWithTimeoutDiagnostics` missing from R8 rules? HOT 3
- Introduce Flow.all/any/none operators HOT 3
- [WASM] JsException: Exception was thrown while running JavaScript code kotlinx.coroutines.error_$external_fun HOT 6
- Suppressed exceptions are lost during stacktrace recovery HOT 2
- `runBlocking` executes other tasks instead of its own HOT 1
- "Kotlin Compiler Error: NoClassDefFoundError for kotlin/reflect/full/KClasses during Gradle build" HOT 1
- Add argument to sample to sample at the start of a flow instead of the end? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlinx.coroutines.