https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
t

Toan Nguyen

10/05/2023, 9:39 AM
Hi guys! I'm newbie in CMP. I'm stuck when build IOS in template project . It always throw error
Copy code
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution Compile\ Kotlin /Users/toan.nguyen2/Desktop/DemoCustomView/DemoCMP/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Script-05D91A922A5F233C00F138EB.sh (in target 'iosApp' from project 'iosApp')
(1 failure)
Anyone help me resolve this erorr? i can not find the reason for this error.
k

Konstantin Tskhovrebov

10/05/2023, 12:25 PM
did you try to build a project from https://terrakok.github.io/Compose-Multiplatform-Wizard/ ?
could you show an output of
kdoctor -a -v
from your project dir?
t

Toan Nguyen

10/06/2023, 1:57 AM
@Konstantin Tskhovrebov It's error by cocoapod?
k

Konstantin Tskhovrebov

10/06/2023, 6:19 AM
No. You can ignore the cocoapods error
t

Toan Nguyen

10/06/2023, 6:53 AM
or bc gradle?
k

Konstantin Tskhovrebov

10/06/2023, 7:12 AM
Upload a full output to gist, please
t

Toan Nguyen

10/06/2023, 7:14 AM
and i use this https://terrakok.github.io/Compose-Multiplatform-Wizard/ it still error same above @Konstantin Tskhovrebov
k

Konstantin Tskhovrebov

10/06/2023, 8:02 AM
It is much easier if you use http://gist.github.com/
t

Toan Nguyen

10/06/2023, 8:04 AM
k

Konstantin Tskhovrebov

10/06/2023, 8:21 AM
this is build log. I asked about
kdoctor -a -v
output in your project root
t

Toan Nguyen

10/06/2023, 8:31 AM
oh i tried this but it still error. I send u my kdoctor -a -v https://gist.github.com/mvn-toannguyen2-dn/d09b855f835a5190082565d506c3af48
i build successful in X-code but i can not build IOS in android studio via mobile mutilplatform plugin
k

Konstantin Tskhovrebov

10/06/2023, 8:38 AM
output of
kdoctor -a -v
from your project dir
and your Xcode uses java 17 but system java is 8
you have to set JAVA_HOME
t

Toan Nguyen

10/06/2023, 8:47 AM
sr my log
Kdoctor -a -v
misss this
Copy code
[✖] Project: /Users/toan.nguyen2/Desktop/DemoCustomView/DemoCMP
  ➤ Gradle (8.2.1)
  ✖ Gradle error
    Run in terminal '/Users/toan.nguyen2/Desktop/DemoCustomView/DemoCMP/gradlew -p /Users/toan.nguyen2/Desktop/DemoCustomView/DemoCMP --info'

Recommendations:
  ➤ IDE doesn't suggest running all tests in file if it contains more than one class
    More details: <https://youtrack.jetbrains.com/issue/KTIJ-22078>
Conclusion:
  ✖ KDoctor has diagnosed one or more problems while checking your environment.
    Please check the output for problem description and possible solutions.
and i add Java17 to custom Path xcode already
k

Konstantin Tskhovrebov

10/06/2023, 8:52 AM
Because your system Java is 8
t

Toan Nguyen

10/06/2023, 9:22 AM
Oh my bad. I see the conflict verions java in my computer. I fixed and run successful. Thank you a lot your support. I'm stupid with silly error 😂
3 Views