Hi guys, I’m trying to build the starter android...
# ios
g
Hi guys, I’m trying to build the starter android / ios project with kotlin but I’m getting an error like
No such module 'app'
I’ve already tried several variations and don’t work. It looks like the project is generating a main.framework instead of a app.framework. Either way I tried to change the references to main.framework to app.framework and then rename the folder inside the build/bin/ios/…. But I’m still with this error =/ How can I solve this problem and correctly build the project?
s
g
Hi, I’ve read this all tutorial. But since it is a little different from the intellij template to create new android / ios projects I preferred to go for the templates. Since I’ve seen this new template are updated, using
implemenatation kotlin('stdlib')
for example. I filed an issue of this on jetbrains issue track where I explained how I could find a workaround for this but it looks like the android / ios new project template in IntelliJ is broken.
s
You can rename the framework by using new
binaries
DSL, e.g.
Copy code
iosArm64("ios") {
        binaries {
            framework("app")
        }
    }
See more examples here: https://github.com/JetBrains/kotlin/blob/1.3.20/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-native-binaries/kotlin-dsl/build.gradle.kts#L69
g
Oh, very interesting. Now I have a solution working with the main.framework, but I’ll keep this in mind 😃 Thanks a lot
p
Hi @Danilo, can you share your solution please?
g
Hi @pandawarrior, I make my solution available at this link: https://github.com/Danilo-Araujo-Silva/kotlin-multiplatform-android-ios-example I was needing sometime because now I’m using a build.gradle.kts and I created a module for the iosApp, so it is on a different form for me now. Either way, I’ve fetched the IntelliJ template and updated the files. The solution worked in the Android and iOS simulators.
👍 1