I am not able to build the KMM template - <https:/...
# compose-ios
s
I am not able to build the KMM template - https://github.com/JetBrains/compose-multiplatform-ios-android-template
Copy code
Execution failed for task ':shared:podInstall'.
> 'pod install' command failed with code 1.
  Full command: pod install
  Error message:
      [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
      Consider adding the following to ~/.profile:
      export LANG=en_US.UTF-8
      [0m
  /usr/local/Cellar/ruby@3.0/3.0.6/lib/ruby/3.0.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
I have added the following in the
~/.zprofile
file.
Copy code
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
There is only one podfile in the root of the project where I have already run pod install
👍 1
d
Hello! You can try to run:
Copy code
brew install kdoctor
kdoctor
It will help to investigate what's wrong with the environment
s
According to kdoctor, the environment is setup properly.
k
@Sudhir Singh Khanger
Copy code
iosApp % 
rm -rf Pods
rm Podfile.lock
pod install
and, try again!
s
@KimJason what is the best way to install cocoapod on Intel Mac? I have used the following way.
sudo gem install cocoapods
And
iosApp %
meaning I should be in that folder? But I think the podfile is in root folder.
k
@Sudhir Singh Khanger Run the three commands in the iosApp folder under the root project!
s
@KimJason still not able to build. Here is the full log. https://gist.github.com/sudhirkhanger/5553bdf9fa987be1c2ebe59514fcf5a5
Copy code
➜  iosApp git:(main) pod install
Analyzing dependencies
Downloading dependencies
Installing shared (1.0.0)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
k
I’m not quite sure. 😢 Would you like to try ‘Rebuild Project’?
s
I can’t do anything because the first gradle sync hasn’t happened yet. So there are no tasks to be executed even the rebuild.
k
ChatGPT was a great help when I was trying out Compose Multiplatform. Have you tried sending the error messages to GPT?
Don’t give up! You just need to overcome a few initial hurdles!
a
@Sudhir Singh Khanger look what I did in 1 hour and the problem fixed, I used chat gpt to add
Copy code
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
to two file /.profile /.zprofile and the problem didn't solve after that I change the mac user then back to the user and the project build successfully, it seems that the changes in terminal command have applied after re-login to user,
s
I don’t know what exactly is the solution but I set shell and environment variables eagerly in both the system and Android Studio. After which a few restarts and it started working.