To browser
- git clone && cd into folder
- npm i
- ionic serve
To a android device ... prev steps
- ionic build
- npx cap copy
- npx cap open android
or
- ionic cap build android
ionic build
vs ionic cap build
$ ionic build [options]
ionic build
will perform an Ionic build, which compiles web assets and prepares them for deployment.
$ ionic cap build <platform> [options]
ionic cap build
will do the following:
- Perform ionic build
- Copy web assets into the specified native platform
- Open the IDE for your native project (Xcode for iOS, Android Studio for Android)
Once the web assets and configuration are copied into your native project, you can build your app using the native IDE. Unfortunately, programmatically building the native project is not yet supported.
[error] Unable to launch Android Studio. You must configure "linuxAndroidStudioPath" in your capacitor.config.json to point to the location of
studio.sh
, using JavaScript-escaped paths:
Example:
{
"linuxAndroidStudioPath": "/usr/local/android-studio/bin/studio.sh"
}
# mkdir -p /usr/local/android-studio/bin
# find / -name studio.sh
3. Create soft link to studio.sh
, where $ANDROID_STUDIO is the path where Android Studio is installed:
# ln -s $ANDROID_STUDIO/bin/studio.sh /usr/local/android-studio/bin/studio.sh