Giuseppe Joshua Falcone
06/05/2025, 9:50 AM./gradlew --stop
./gradlew clean
rm -rf composeApp/build/
rm -rf .gradle/
rm -rf ~/.gradle/caches/
And build back but nothing has been working.
If someone have any tip on how to try to fix this let me know.
Thanks.Alexandru Resiga
06/10/2025, 11:57 AMDrawable0.commonMain.kt
file at the time of the error? you can strip away resources names and paths or any other sensitive data, or you can share it with us JetBrains through a YouTrack ticket with limited visibility, thank you!Giuseppe Joshua Falcone
06/11/2025, 9:10 AMkotlin = "2.1.21"
The content of the drawable was just the base Compose logo that is given when creating the project.
Content of Drawable0.commonMain.kt was:
@file:OptIn(InternalResourceApi::class)
package myapp.composeapp.generated.resources
import kotlin.OptIn
import kotlin.String
import kotlin.collections.MutableMap
import org.jetbrains.compose.resources.DrawableResource
import org.jetbrains.compose.resources.InternalResourceApi
import org.jetbrains.compose.resources.ResourceItem
private const val MD: String = "composeResources/myapp.composeapp.generated.resources/"
internal val Res.drawable.compose_multiplatform: DrawableResource by lazy {
DrawableResource("drawable:compose_multiplatform", setOf(
ResourceItem(setOf(), "${MD}drawable/compose-multiplatform.xml", -1, -1),
))
}
@InternalResourceApi
internal fun _collectCommonMainDrawable0Resources(map: MutableMap<String, DrawableResource>) {
map.put("compose_multiplatform", Res.drawable.compose_multiplatform)
}
Same for the content of the strings.xml was just
<resources>
<string name="app_name">App Name</string>
</resources>
Content of the String0.commonMain.kt was
@file:OptIn(InternalResourceApi::class)
package myapp.composeapp.generated.resources
import kotlin.OptIn
import kotlin.String
import kotlin.collections.MutableMap
import org.jetbrains.compose.resources.InternalResourceApi
import org.jetbrains.compose.resources.ResourceItem
import org.jetbrains.compose.resources.StringResource
private const val MD: String = "composeResources/myapp.composeapp.generated.resources/"
internal val Res.string.app_name: StringResource by lazy {
StringResource("string:app_name", "app_name", setOf(
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 10, 24),
))
}
@InternalResourceApi
internal fun _collectCommonMainString0Resources(map: MutableMap<String, StringResource>) {
map.put("app_name", Res.string.app_name)
}
But the issue that the compiler was giving was including all the fils in my proj printed as following:
* Source files: Drawable0.commonMain.kt, String0.commonMain.kt, ExpectResourceCollectors.kt, Res.kt, ActualResourceCollectors.kt, MyApp.kt, MyService.kt, MyServiceImpl.kt, MyObjDetail.kt, MyRepositoryImpl.kt, MyKoin.kt, ServiceModule.kt, NetworkModule.kt, RepositoryModule.kt, UseCaseModule.kt, ViewModelModule.kt, MyRepository.kt, MyUseCase.kt, HttpClient.kt, MyUiState.kt, MyViewModel.kt, NavigationScreen.kt, Error.kt, Network.kt, NetworkError.kt, PlatformUtil.kt, MainViewController.kt, NetworkModule.ios.kt, PlatformUtil.ios.kt
* Compiler version: 2.1.21
* Output kind: LIBRARY
Seems like everything works as expected with version 2.1.20