Getting Ready
Install latest Android Studio version (I’m using RC Dolphin).
Make sure your Kotlin Plugin has 1.7.x version.
Make sure you have Ruby gem installed. gem list
Make sure you have Java JDK installed. java --version
To use the Android KMM Wizard Template, first you need to install a KMM plugin and restart AS.
Clone the repository and try opening the starter project. Sync the dependencies:
Build and run the app.
If the emulators starts, then everything is fine.
If you run into a problem, it may be one of these:
If you have a Apple M1 Chip and the next command in terminal returns empty:
echo $LANG
Then in terminal:
open -e ~/.zshrc
And add this line to the opened file:
export LANG=en_US.UTF-8
After saving your .zshrc file, you must run next command:
source ~/.zshrc
If you’re running into Java JDK problem, do the following:
/usr/libexec/java_home -V
Your output should be something like:
18 (arm64) "Oracle Corporation" - "OpenJDK 18" …/Library/Java/JavaVirtualMachines/openjdk-18/Contents/Home 1.8.0_292 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
brew install openjdk@11
sudo ln -sfn /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
/usr/libexec/java_home -V
Your output should be something like:
18 (arm64) "Oracle Corporation" - "OpenJDK 18" …/Library/Java/JavaVirtualMachines/openjdk-18/Contents/Home 11.0.15 (arm64) "Homebrew" - "OpenJDK 11.0.15" /opt/homebrew/Cellar/openjdk@11/11.0.14.1/libexec/openjdk.jdk/Contents/Home 1.8.0_292 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
open ~/.zshrc
In zshrc add and save: export JAVA_HOME=$(/usr/libexec/java_home -v 11.0.15)
export JAVA_HOME='/usr/libexec/java_home -v 11.0.15\'