Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

639
Views
Multiplatform error when building iosApp: Command PhaseScriptExecution failed with a nonzero exit code

I am working on a multiplatform app in Kotlin on Android Studio and when I try to run the app to an iOS simulator, I get this error:

The following build commands failed:

PhaseScriptExecution [CP-User]\ Build\ shared /Users/cjm/AndroidStudioProjects/GlobeMultiplatform/build/ios/Pods.build/Debug-iphonesimulator/shared.build/Script-882AF45D8B8C4938AC461F4FBA0FE197.sh (in target 'shared' from project 'Pods')

The code in the build.gradle that sets the cocoa pods is this:

cocoapods {
    summary = "Shared"
    homepage = "Link to the Shared Module homepage"
    ios.deploymentTarget = "13"
    frameworkName = "shared"
    podfile = project.file("../iosApp/Podfile")
}

I ran pod install and it showed success but the build of the app still fails. How can I fix this error? What is causing this error? I am brand new to Kotlin and especially Kotlin Multiplatform so I apologize if this is a stupid question.

EDIT: Here's what Xcode says when running the app:

FAILURE: Build failed with an exception.

  • Where: Build file '/Users/cjm/AndroidStudioProjects/GlobeMultiplatform/androidApp/build.gradle.kts' line: 1

  • What went wrong: An exception occurred applying plugin request [id: 'com.android.application']

Failed to apply plugin 'com.android.internal.application'. Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing org.gradle.java.home in gradle.properties.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It seems that it tries to build your code with Java 1.8, you need a Java > 11 version.

I'd look into this or other guidelines to make sure the proper JDK version is used

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!