Hey guys i wanted to add another data module for m...
# multiplatform
b
Hey guys i wanted to add another data module for my kmp app only for data purpose like api calls room etc. We used tro have a tab to add moldule in KMP in Android studio it was removed so i copied a module from another working proj and changed the neessecery things but i am getting an error for manifest in that module
Copy code
A problem was found with the configuration of task ':data:processDebugMainManifest' (type 'ProcessApplicationManifest').
  - Type 'com.android.build.gradle.tasks.ProcessApplicationManifest' property 'mainManifest' specifies file '/Users/bharatkumar/Downloads/Phodo-Quiz-App/data/src/androidMain/AndroidManifest.xml' which doesn't exist.
Copy code
plugins {
    alias(libs.plugins.multiplatform)
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlinx.serialization)
}

kotlin {
    androidTarget()
    listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach {
        it.binaries.framework {
            baseName = "data"
            isStatic = true
        }
    }

    sourceSets {
        commonMain{
            dependencies {
              //  implementation(libs.kmpLog)
                implementation(libs.kotlinx.serialization.json)

                // Koin
                implementation(libs.koin.core)

                //Ktor
                implementation(libs.ktor.client.core)
                implementation(libs.ktor.client.content.negotiation)
                implementation(libs.ktor.client.serialization)
                implementation(libs.ktor.client.serialization.json)
                implementation(libs.ktor.client.logging)
            }
        }
        commonTest.dependencies {
          // implementation(libs.kotlin.test)
        }
        iosMain.dependencies {
            implementation(libs.ktor.client.darwin)
        }
        androidMain.dependencies {
            implementation(libs.ktor.client.okhttp)

        }
    }
}

android {
    namespace = "org.iapprusher.data"
    compileSdk = 35
    defaultConfig {
        minSdk = 24
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
}
The above is my gradle for Data module
p
The error speaks by itself, you need to specify a manifest file for the Android target. You are also applying the Android
application
plugin, for a library it should be the Android
library
plugin
🫡 1
b
Shit i missed to see that @Pablichjenkov Thanks this was a silly mistake 😫
I got it that it asked me for manifest but i did not get why obviously if i use application plugin it would
👍 1
p
In libraries I think is optional(only if you need it) now
b
Okk let me check that too
m
Hello @bk9735732777 - have you solved this? You can get the KMP Shared Module by installing Android Studio preview. Is your goal to add 2 KMP modules to a single project? Thanks.
b
@Matt Dyor yes it is solved it was a silly mistake but which AS version has it cos my version does not. I am using ladybug