https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
h

Hadji Musaev

10/27/2021, 2:39 PM
Hey guys! I’m having some difficulties with setting up tests for my KMM project which is supposed to produce an android library among other artifacts. I get this error:
Execution failed for task ‘:generateDebugBuildConfig’.
> Error while evaluating property ‘buildConfigPackageName’ of task ‘:generateDebugBuildConfig’
> Failed to calculate the value of task ‘:generateDebugBuildConfig’ property ‘buildConfigPackageName’.
> Failed to query the value of property ‘packageName’.
> Manifest file does not exist: /…/src/main/AndroidManifest.xml
And indeed the project structure is different and my android modules are
androidMain
and
androidTest
, not just
main
and
test
. Has anyone had to solve this problem?
d

Daniel Rampelt

10/27/2021, 2:43 PM
You can change the path of the AndroidManifest.xml file with something like this:
Copy code
android {
  sourceSets {
    getByName("main") {
      manifest.srcFile("src/androidMain/AndroidManifest.xml")
    }
  }
Either that or you'd have to create a main folder that just has the AndroidManifest.xml file in it
h

Hadji Musaev

10/27/2021, 2:46 PM
A-ha, thanks Daniel! It did the trick 🙂
130 Views