JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.2k stars 1.17k forks source link

Template not work: The project is using an incompatible version (AGP 7.4.2) of the Android Gradle plugin. Latest supported version is AGP 7.2.0 See Android Studio & AGP compatibility options. #3249

Closed evangerlions closed 1 year ago

evangerlions commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Affected platforms Select one of the platforms below:

Versions

To Reproduce git clone https://github.com/JetBrains/compose-multiplatform-template and use IntelliJ IDEA 2022.2.3 (Community Edition) open the folder trigger gradle sync will show image

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here. image

m-sasha commented 1 year ago

You need to use Android Studio, not IDEA.

evangerlions commented 1 year ago

You need to use Android Studio, not IDEA.

Thanks your answer, BTW how about required Android Studio version?

I use Android Studio Flamingo | 2022.2.1 Beta 4

But gradle sync has some error like:

Cannot convert object of class org.jetbrains.kotlin.idea.gradleTooling.arguments.CachedExtractedArgsInfoImpl to org.jetbrains.kotlin.idea.projectModel.CachedArgsInfo<?>. image

m-sasha commented 1 year ago

I'm on Android Studio Flamingo | 2022.2.1 Patch 2 and it appears to work for me. Can you try all the steps from https://github.com/JetBrains/compose-multiplatform-template from scratch, using Android Studio?

evangerlions commented 1 year ago

I'm on Android Studio Flamingo | 2022.2.1 Patch 2 and it appears to work for me. Can you try all the steps from https://github.com/JetBrains/compose-multiplatform-template from scratch, using Android Studio?

I used the template and create a github repo. then I clone it to my PC. git clone git@github.com:evangerlions/ComposeMultiTemplate.git

and open ComposeMultiTemplate folder with Android Studio. when it did auto gradle sync, will show the error: Cannot convert object of class org.jetbrains.kotlin.idea.gradleTooling.arguments.CachedExtractedArgsInfoImpl to org.jetbrains.kotlin.idea.projectModel.CachedArgsInfo<?>. image

I've been using android studio for development, and normal android apps run completely fine. You can check kdoctor info in my previous post.

m-sasha commented 1 year ago

Perhaps clearing some cache (gradle and/or Android Studio) will help? Also try the latest stable Android Studio Flamingo | 2022.2.1 Patch 2

m-sasha commented 1 year ago

Also make sure you have the Kotlin Multiplatform Mobile plugin installed:

image
evangerlions commented 1 year ago

Also make sure you have the Kotlin Multiplatform Mobile plugin installed:

image

Android Studio Flamingo | 2022.2.1 Patch 2 can work,Thank you very much!

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.