lichobile icon indicating copy to clipboard operation
lichobile copied to clipboard

The iOS and Android versions don't work step-by-step with the installation instructions.

Open shyamalschandra opened this issue 2 years ago • 3 comments

Describe the bug The iOS and Android versions don't work step-by-step with the installation instructions.

To Reproduce Steps to reproduce the behavior:

  1. npx cap run android doesn't work.

Expected behavior I expect the path to be correct but the platform-tools is not installed by homebrew in the right location.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Android Simulator
  • OS: n/a
  • Browser n/a
  • Version 24

shyamalschandra avatar Mar 20 '22 13:03 shyamalschandra

This is arguably an error in installing the Android SDK. The solution (on Linux) is: $ export ANDROID_SDK_ROOT=path/to/Android/Sdk/

A similar error pops up with "npx cap open android", where Capacitor complains of not being able to find Android Studio. The solution there is to set the appropriate environment variable:

$ export CAPACITOR_ANDROID_STUDIO_PATH=path/to/android-studio/bin/studio.sh

Note that the latter needs to point to the actual executable.

fyodor1 avatar Mar 24 '22 11:03 fyodor1

I have a Mac. What is the exact step-by-step to resolve this problem. Thanks in advance!

shyamalschandra avatar Mar 26 '22 22:03 shyamalschandra

Have you tried the above commands?

Find the Android Sdk installation folder and use the export command as in the example. Similarly, for the second command, find the Android Studio executable and sub in the path to it.

On Mac you're probably either using zsh or bash shell. If you want to make these variables permanent, add the commands to .bash_profile or .zshenv in your user's home folder (~).

fyodor1 avatar Mar 26 '22 22:03 fyodor1