Michael Paus
12/01/2022, 3:46 PMNikita Lipsky
12/02/2022, 10:10 AMMichael Paus
12/02/2022, 11:39 AMDima Avdeev
12/02/2022, 4:40 PMNikita Lipsky
12/03/2022, 10:11 AMMichael Paus
12/03/2022, 11:31 AMMichael Paus
12/03/2022, 11:56 AMExecution failed for task ':commonizeNativeDistribution'.
> Could not resolve all files for configuration ':kotlinKlibCommonizerClasspath'.
> Cannot resolve external dependency org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.7.20 because no repositories are defined.
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
Before I start to fiddle around with it I thought I better ask here. I used
IntelliJ IDEA 2022.3 (Community Edition)
Build #IC-223.7571.182, built on November 29, 2022
on an Intel Mac.Dima Avdeev
12/03/2022, 2:26 PMbrew install cocoapods
)
The easiest way to run is to use AppCode or AndroidStudio with KMM plugin, as described in README.
But, also you can use Xcode.
• open project in Idea, link build.gradle.kts and sync gradle
• go to iosApp
dir in terminal
• pod install
• open FallingBalls.xcworkspace
• Run on simulator or deviceDima Avdeev
12/03/2022, 2:31 PMDima Avdeev
12/03/2022, 2:34 PMMichael Paus
12/03/2022, 3:53 PMsudo gem install cocoapods
and
% which pod
/usr/local/bin/pod
shows where it is installed.
I also have AndroidStudio with the KMM plugin installed
Android Studio Flamingo | 2022.2.1 Canary 9
Build #AI-222.4345.14.2221.9321504, built on November 22, 2022
Kotlin Multiplatform Mobile
Jetbrains 0.5.1(222)-30
but the error message in AndroidStudio is exactly the same as above when I just open the project. Are there still some more manual configuration steps necessary?
I also doubt that the “commonizer”-problem has anything to do with cocoapods.Dima Avdeev
12/03/2022, 4:00 PMDima Avdeev
12/03/2022, 4:01 PMDima Avdeev
12/03/2022, 4:01 PMMichael Paus
12/03/2022, 4:02 PMDima Avdeev
12/03/2022, 4:02 PMDima Avdeev
12/03/2022, 4:04 PMiosApp
dir in terminal
• pod install
• open FallingBalls.xcworkspace
• Run on simulator or deviceMichael Paus
12/03/2022, 4:04 PMAndroid Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
Same error message.Michael Paus
12/03/2022, 4:05 PMDima Avdeev
12/03/2022, 4:06 PMMichael Paus
12/03/2022, 4:11 PMDima Avdeev
12/03/2022, 4:11 PMDima Avdeev
12/03/2022, 4:12 PMDima Avdeev
12/03/2022, 4:12 PMMichael Paus
12/03/2022, 4:20 PMmpaus@ip8-4 falling-balls-mpp % cd iosApp
mpaus@ip8-4 iosApp % pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
mpaus@ip8-4 iosApp % open FallingBalls.xcworkspace
mpaus@ip8-4 iosApp %
and opened XCode and I was able to build and run the example. This was the first time I ever had to use XCode 🙂 because I have never been an iOS developer although I own a Mac.Dima Avdeev
12/03/2022, 4:21 PMMichael Paus
12/03/2022, 4:23 PMDima Avdeev
12/03/2022, 4:25 PMpod-install
only for the first time of creating a project.Dima Avdeev
12/03/2022, 4:25 PMDima Avdeev
12/03/2022, 4:26 PMMichael Paus
12/03/2022, 4:29 PMMichael Paus
12/03/2022, 4:32 PMDima Avdeev
12/03/2022, 4:44 PMWhat is the required procedure to re-open the already existing project?Just reopen FallingBalls.xcworkspace • from terminal with command
open FallingBalls.xcworkspace
• Or in Finder directoryDima Avdeev
12/03/2022, 4:45 PM./gradlew deployIPhone8Debug
we not decide yet, but we understand your interest, Thanks!Michael Paus
12/03/2022, 5:31 PMExecution failed for task ':commonizeNativeDistribution'.
> Could not resolve all files for configuration ':kotlinKlibCommonizerClasspath'.
> Cannot resolve external dependency org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.7.20 because no repositories are defined.
is due to this declaration in the top-level build.gradle.kts file.
subprojects {
repositories {
google()
mavenCentral()
maven("<https://maven.pkg.jetbrains.space/public/p/compose/dev>")
}
}
If you move the inner part out of the subprojects block the build works and the commonizer dependency can be resolved. The tricky think is that if it was resolved once, the original declaration also does not produce an error anymore. Therefore you will probably not be able to reproduce this bug unless you completely empty all local gradle storage.Dima Avdeev
12/03/2022, 5:32 PMDima Avdeev
12/03/2022, 5:34 PMsubprojects {
to allprojects {
We will change it