hafiz
01/13/2025, 2:45 AMTask :composeApp:compileCommonMainKotlinMetadata FAILED
e: file:///Users/mohdhafiz/StudioProjects/katmaans_mobile_frontend/composeApp/src/commonMain/kotlin/com/kloudius/katmaans/data/db/AppDatabase.kt:23:8 Object 'AppDatabaseConstructor' is not abstract and does not implement abstract member 'initialize'.
sample code
// The Room compiler generates the `actual` implementations.
@Suppress("NO_ACTUAL_FOR_EXPECT")
expect object AppDatabaseConstructor : RoomDatabaseConstructor<AppDatabase>
Event upgrade library room also the same and running ./gradlew build failed because of this.
how to solve?Pablichjenkov
01/13/2025, 4:33 AMChrimaeon
01/13/2025, 7:27 AMhafiz
01/13/2025, 8:14 AMPablichjenkov
01/13/2025, 8:19 AMhafiz
01/20/2025, 2:39 AM// The Room compiler generates the `actual` implementations.
@Suppress("NO_ACTUAL_FOR_EXPECT")
expect object AppDatabaseConstructor : RoomDatabaseConstructor<AppDatabase>
Pablichjenkov
01/20/2025, 3:13 AMChrimaeon
01/20/2025, 1:19 PM> When you declare an expect object with the interface RoomDatabaseConstructor, the Room compiler generates the actual implementations. Android Studio might issue a warning "Expected object 'AppDatabaseConstructor' has no actual declaration in module"; you can suppress the warning with @Suppress("NO_ACTUAL_FOR_EXPECT").https://developer.android.com/kotlin/multiplatform/room#defining-database
hafiz
01/21/2025, 8:07 AMEric Ho
02/03/2025, 7:34 AMEric Ho
02/03/2025, 7:35 AMhafiz
02/04/2025, 1:42 AM> Task :composeApp:linkReleaseFrameworkIosArm64 FAILED
w: Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: ComposeApp. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag.
e: Compilation failed: Java heap space
* Source files:
* Compiler version: 2.0.20
* Output kind: FRAMEWORK
and here also:
> Task :composeApp:xcodeVersion
w: Kotlin <-> Xcode compatibility issue:
The selected Xcode version (16.2) is higher than the maximum known to the Kotlin Gradle Plugin.
Stability in such configuration hasn't been tested, please report encountered issues to https://kotl.in/issue
Maximum tested Xcode version: 15.3