Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(android): clarify steps to set up native project and run with Capacitor #1889

Merged
merged 4 commits into from
Jun 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions docs/developing/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ If you are using any version of **`cordova-android`** below `10.0.0`, install th

Before apps can be deployed to Android simulators and devices, the native project must be configured.

1. **Generate the native project, if it does not already exist.**
1. **Perform an Ionic build, if you haven't already.**

```
$ ionic build
```

2. **Generate the native project, if it does not already exist.**

For Capacitor, run the following:

Expand All @@ -139,7 +145,7 @@ Before apps can be deployed to Android simulators and devices, the native projec
$ ionic cordova prepare android
```

2. **Set the [Package ID](../reference/glossary.md#package-id).**
3. **Set the [Package ID](../reference/glossary.md#package-id).**

For Capacitor, open the `capacitor.config.json` file and modify the `appId` property.

Expand All @@ -157,9 +163,17 @@ Capacitor uses Android Studio to build and run apps to simulators and devices.
$ ionic capacitor copy android
```

2. **In Android Studio, click the Run button and then select the target simulator or device.**
2. **Run the app on a simulator or device.**

You can open the Android Studio Project using:

```shell
$ ionic capacitor open android
```

In Android Studio, click the Run button and then select the target simulator or device.

![Android Studio Run Button Area](/img/running/android-studio-run-button-area.png)
![Android Studio Run Button Area](/img/running/android-studio-run-button-area.png)

### Live reload

Expand Down