Kotlin multiplatform (ios & android) shared code experimental
-
Download Intellij Idea.
-
Download the JDK.
-
Set ANDROID_ROOT_SDK variable on your terminal to your sdk location (example: /Users/your_user/Library/Android/sdk)
-
Set JAVA_HOME variable on your terminal to your JDK location. You can use:
export JAVA_HOME= $(/usr/libexec/java_home -v your_version)example:
export JAVA_HOME=$(/usr/libexec/java_home -v 14.0.1) -
Download the latest cmdLine tools for Android command line.
-
Now replace the folder Tools inside the sdk with the one you just downloaded. It may be needed to place this Tools folder inside a new one called "cmdline-tools".
-
Navigate on Terminal to your SDK, then
cmdline-tools/tools/binand use./sdkmanager —licenses -
Update Gradle version in gradle/wrapper/gradle-wrapper.properties to 6.3 or the latest.
-
Run the command
gradle wrapper --gradle-version latest_versionexample:
gradle wrapper --gradle-version 6.3You can do this on Intellij's own Terminal