Тёмный

How to Migrate an Android Project to Kotlin Multiplatform (KMP) 

Philipp Lackner
Подписаться 175 тыс.
Просмотров 29 тыс.
50% 1

In this video, you'll learn how you can take an existing native Android project in Android Studio and migrate it to Kotlin Multiplatform, so you can use the app on iOS as well.
🏴🏴🏴 PL CODING BLACK WEEK - Save up to 50% on ALL premium courses and bundles:
pl-coding.com/premium-courses...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/drop-table-ment...
Get my FREE PDF about 20 things you should never do in Jetpack Compose:
pl-coding.com/jetpack-compose...
Regular programming advice on my Instagram page:
/ _philipplackner_
Join my Discord server:
/ discord
Kotlin Multiplatform iOS setup guide:
www.jetbrains.com/help/kotlin...
Kotlin Multiplatform is stable - blog article from JetBrains:
blog.jetbrains.com/kotlin/202...

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 67   
@khanzadakashif8248
@khanzadakashif8248 8 месяцев назад
It was a good tutorial, but it would be better if you now create one in which you migrate this project to share the UI as well with compose multiplatform.
@jamesdavenavor6247
@jamesdavenavor6247 8 месяцев назад
Thanks a lot Philipp I was already trying to figure out how to do it but you just went and gave an answer
@atglira
@atglira 2 месяца назад
My hero! thank you very much! amazing job Mr. Lackner
@MobileMastersAndroidiOS
@MobileMastersAndroidiOS 8 месяцев назад
Great job Philipp!
@daniyar2718
@daniyar2718 Месяц назад
thanks for this video
@mahmoudalkateb2008
@mahmoudalkateb2008 8 месяцев назад
LETS GOOOO 🎉
@SamandarSdk
@SamandarSdk 8 месяцев назад
Nice video Philipp. Have u tried Fleet ide?
@JacobFerrero
@JacobFerrero 8 месяцев назад
Hey Philipp, do you have any tutorials on how to dynammically load KMP modules, specifically for Web projects? I want to reduce the size of my initial download every visitor needs to download.
@ranjanrukhaya3025
@ranjanrukhaya3025 8 месяцев назад
Great work @philipp lackner Just wandering how we can do it for android library. Can we have a tutorial on this, that would be really helpful. Thx
@kesavguru415
@kesavguru415 8 месяцев назад
Nice live Philipp 🎉😊
@OlegsSimRacing
@OlegsSimRacing 14 дней назад
If you don't see option of creating a KMP module, you need to turn on experimental settings: In Android Studio settings, turn on the Enable experimental Multiplatform IDE features option in the Advanced Settings section.
@vikashparajuli
@vikashparajuli 8 месяцев назад
Cheers for the tutorial. In the real project, there will be lots of work on the migration. Most of the libraries (written in java) that we use on the native android app doesn't work on KMP. This needs to be replaced with the KMP support libraries.
@Wallenlaguinee
@Wallenlaguinee 8 месяцев назад
Wow, Flutter dependency configuration is so much easier. "flutter pub get [your desired package]". But thanks for an informative tutorial as usual!
@user-ec8rq3uu5r
@user-ec8rq3uu5r 8 месяцев назад
Hi Philipp, I have a question and hope you will answer it for me. We interact between view and viewmodel using state variable and onEvent function written in viewmodel. Because all states are written into State data class (Ex: HomeState), when there is an event such as click the button or enter text in textfield, onEvent function will be called. This will result in the state variable being assigned a new value, and all views related to this state variable in the Screen will be recomposed. This is something we do not want to happen. Can you give me some solution to fix this? Thank you so much... ❤
@asifmehmood9307
@asifmehmood9307 8 месяцев назад
Great job @philipp lackner I have one question from kotlin DSL or version catalog which one is better than for handling dependencies?
@sudarshanbhatt9435
@sudarshanbhatt9435 8 месяцев назад
both are independent things. but you can use version catalog, its pretty handy and easy to use
@samer616
@samer616 8 месяцев назад
Hey Philipp, does the premium course use a multi modular architecture? I have a multi modular project using CLEAN on Android and would like to migrate to use KMP for the new iOS project.
@vendrieyulman2917
@vendrieyulman2917 8 месяцев назад
please make a tutorial video about how to configure dekstop, ios android KMM.
@nomejodas2978
@nomejodas2978 8 месяцев назад
Philipp, do you think it would be wise to do all the Domain and Data layer using KMM and the presentation later using Flutter?
@tutrieu3250
@tutrieu3250 8 месяцев назад
I have a question.if I use window.Can I run KMP without plugin xcode ios right?😢😢
@arozendojr
@arozendojr 8 месяцев назад
I got an old MacBook that runs iOS simulator, is it possible to run xcode on my M1 and run iOS app on the old MacBook?
@arozendojr
@arozendojr 8 месяцев назад
Can you make GitHub available, commit before and after migration, please
@abacaabaca8131
@abacaabaca8131 8 месяцев назад
I must say i never understand gradle but currently i am learning libgdx because i was suprised kotlin can be used and run the .apk on android. And its working. Maybe later i will try this (compile into apple).
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
Is that a 2d engine?
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
Gradle sucks and it’s a required pain point for android dev
@footballCartoon91
@footballCartoon91 8 месяцев назад
@@ChrisAthanas i was able to follow a tutorial from gamefromscratch youtube channel and render a 3d model with animation in my android phone. But it uses JSON library if not mistaken to parse the .g3db (the binary format) of the model's object file . If you want it to parse its respective text format which is .g3dj it can do it as well. But currently, i want to figure out how to configure the camera for controlling the model's movement.
@soc3xp
@soc3xp 7 месяцев назад
KMM 🎉
@mohanaggarwal4058
@mohanaggarwal4058 7 месяцев назад
Please make a tutorial to make desktop app from existing Android app project
@moonlightstudio
@moonlightstudio 6 месяцев назад
I ask for a tutorial on how to migrate the JVM library to Kotlin multiplatfrom?
@abdelrahmankhaled7575
@abdelrahmankhaled7575 8 месяцев назад
Can we use the new editor Fleet IDE to write the ios code on a windows pc instead of mac xCode IDE ?
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
Likely true but the standard for android will be android studio for next couple years
@arsildo
@arsildo 8 месяцев назад
No to write and test ios apps you need a mac
@argahutama
@argahutama 8 месяцев назад
Hi Philipp, Can we modularize KMP app? For instance, separate the layer of data-domain-presentation?
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
Yes not a problem for kmp
@arsildo
@arsildo 8 месяцев назад
I have been banging my head over this, while you can you have to manage ios frameworks which so far i have had no luck or the skill to perform. At first I went in with the idea of creating my featureA module and have for example featureA ui in Compose and featureA with swiftUi in ios and the common code between them and then import that featureA to the main module, but no that doesn't work or i haven't managed to do it yet, or don't even know if it is possible at this point
@arsildo
@arsildo 8 месяцев назад
a video on this would be great @PhilippLackner
@moldovanpeter5123
@moldovanpeter5123 8 месяцев назад
There is the KMM course from Philipp where he covers this in details. I am suggesting also to read some articles and case studies to broaden your knowledge 😊. Ex. Touchlab.
@user-wc2zr7kk2s
@user-wc2zr7kk2s 6 месяцев назад
Getting 'Failed building KotlinMPPGradleModel" error how to solved it.
@swish6143
@swish6143 6 месяцев назад
I don't get the sharedModule option in 4:10 although I have the KMP Plugin installed. I can also create a new KMP Project.
@jeremymacnicol6023
@jeremymacnicol6023 5 месяцев назад
I'm having the same problem. I'm using Android Studio Hedgehog if that means anything. Ultimately, I copied the "shared" module from the second project and pasted into the original. Hopefully that works.
@marcelbreas3544
@marcelbreas3544 5 месяцев назад
That’s because of the earlier version of the KMP plugin used in the video. I believe this feature was later marked as experimental and in doing so was removed from being shown. You can enable it by going into Android Studio settings and search for ‘kotlin’ under Advanded Settings. A search result ‘Enable experimental Multiplatform IDE features’ should pop up. Enable it, hit apply and restart Android Studio. The option should now show up when you try to create a new module.
@Desuzedart
@Desuzedart 4 месяца назад
@@marcelbreas3544 thank u guys, i faced the same problem. Ur workaround resolved the problem! Best wishes
@Kmg403
@Kmg403 3 месяца назад
@@marcelbreas3544 thank you, this worked.
@superkobke
@superkobke 2 месяца назад
@@marcelbreas3544 Thanks, making the video is easy but answering questions, apparently not
@zaidkamil
@zaidkamil 8 месяцев назад
I am on windows PC, i cant use the IOS modules, and it gives a ton of error. What about it
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
Sorry you need a Mac for the iOS side
@RexTorres
@RexTorres 8 месяцев назад
You need to have XCode which is only available on macOS, because... Apple.
@theren8311
@theren8311 3 месяца назад
IDK man, I appreciate the video, but it's no different from the docs, and you easily consume the docs better. Or maybe it's just me, because if I watched this first I would have to rewatch scenes over because of all the zipping around. But looking at the comments, I guess everyone has their preference. I was hoping watching this I would get something more.
@mohamed-tyb
@mohamed-tyb 8 месяцев назад
is kmm or kmp is best choise
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
KMP is the new name for KMM
@archit7606
@archit7606 8 месяцев назад
Hi. Is your KMM course 69.00£ or 69,00£? Please clarify.
@ahmadab9666
@ahmadab9666 8 месяцев назад
??
@archit7606
@archit7606 8 месяцев назад
@@ahmadab9666 pl-coding Website he has his courses. There I saw the price for KMM to be £69,00. That's why I asked whether it is £69 or £69,00.
@PhilippLackner
@PhilippLackner 8 месяцев назад
69 euros. How the decimal is interpreted differs per region
@unknownbiri
@unknownbiri 8 месяцев назад
Hey. I did code android back then. Then i learned a little web development. But now i can say that coding android was much more fun to me. What do you think is it worth learning android dev in 2024 ? Is there demand ?
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
With KMP it will be the way to produce cross platform apps
@unknownbiri
@unknownbiri 8 месяцев назад
@@ChrisAthanas hmm, that is great reason to come back. I'll think about it
@rahulraj94391
@rahulraj94391 8 месяцев назад
1st
@gofudgeyourselves9024
@gofudgeyourselves9024 8 месяцев назад
Also you should make part two of this video on add KMP code to existing android projectto run it on iOS. Just a simple hello world would do.
@uop6238
@uop6238 8 месяцев назад
I remember Kotlin Multiplatform "mobile" is deprecated 🧐
@pablovaldes6022
@pablovaldes6022 8 месяцев назад
I would rather just git clone and existing template and transfer my Android code to it
@gofudgeyourselves9024
@gofudgeyourselves9024 8 месяцев назад
Anyone getting this error clang: error: no such file or directory: ' -framework shared'
@user-gd7nd9yw5q
@user-gd7nd9yw5q 2 месяца назад
i have error "org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.1.2', apply: false] was not found in any of the following sources: "
@topGfanboy
@topGfanboy 8 месяцев назад
😂😂😂... Google Dart has already started interop with JVM... RIP kotlin soon..
@mohamed-tyb
@mohamed-tyb 8 месяцев назад
is kmm or kmp is best choise
@ChrisAthanas
@ChrisAthanas 8 месяцев назад
KMP is the new name of KMM
Далее
Smart Sigma Kid #funny #sigma #comedy
00:26
Просмотров 8 млн
From React To HTMX
40:01
Просмотров 312 тыс.
Flutter vs Kotlin Multiplatform | Which is better ?
6:38
Modding TikTok to only show Cat Videos
29:12
Просмотров 86 тыс.
Releasing Faster with Kotlin Multiplatform
32:24
Просмотров 11 тыс.