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

matej

04/10/2019, 2:54 PM
I think I'm missing something, but how can I use the
presets.android
target preset with the project structure as they describe it at https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html? I would have to apply the
com.android.application
plugin in the build.gradle inside SharedCode, but that's no good because then Android Studio starts expecting to find an AndroidManifest file there etc. etc.
d

Dennis L

04/10/2019, 3:11 PM
You have to make a dummy androidmanifest file with basically nothing in it (a package name is pretty much the bare minimum), you treat the module like it's an android library and use the android library package, the documentation on it isn't very good at the moment but it does work. If you just want the full app there then you use the android application plugin and put the whole app there
👍 1
m

matej

04/10/2019, 3:13 PM
Awesome! Thanks for the help, I would have never tried that on my own, would have thought it's too hacky 😄
d

Dennis L

04/10/2019, 3:13 PM
I was stuck on the same thing last few days wondering why my android libraries wasn't working and realizing it was just java there not android
m

matej

04/10/2019, 3:13 PM
Yeah, this is all still very much uncharted ground
but exciting!
d

Dennis L

04/10/2019, 3:14 PM
I saw there were some weirdly structured projects on github and thought "Oh this must be some old version of the kotling mpp plugin they were using that put an android app there" but no that's just sort of how it is
I edited a previous message here with some more info on the two options you can take
m

matej

04/10/2019, 3:18 PM
Thanks! I saw it, I think I'll go with the hacky option, something just feels wrong about having the entirety of the Android app inside a shared module
2 Views