Skip to content

Commit

Permalink
#2094: Update installatino instructions to ladybug
Browse files Browse the repository at this point in the history
  • Loading branch information
tanja3981 committed Oct 8, 2024
1 parent 3d5af22 commit ef34884
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 56 deletions.
50 changes: 26 additions & 24 deletions docs/EN/Installing-AndroidAPS/building-AAPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@ See [FAQ page](../Getting-Started/FAQ.md) for details.
(Building-APK-recommended-specification-of-computer-for-building-apk-file)=
## Computer and software specifications for building AAPS

* Please use the **[Android Studio version called at least Hedgehog (2023.1.1) or one more recent like Iguana, Jellyfish, and Koala](https://developer.android.com/studio/)** to build the apk. Older versions of Android Studio need to be updated first!
* Please use the **[Android Studio version called at least Hedgehog (2023.1.1) or one more recent like Iguana, Jellyfish, Koala or Ladybug](https://developer.android.com/studio/)** to build the apk. Older versions of Android Studio need to be updated first!
* [Windows 32-bit systems](troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system.

<table class="tg">
<tbody>
<tr>
<td class="tg-baqh">OS (Only 64 bit)</th>
<td class="tg-baqh">Windows 8 or higher</th>
<td class="tg-baqh">Mac OS 10.14 or higher</th>
<td class="tg-baqh">Any Linux supports Gnome, KDE, or Unity DE;&nbsp;&nbsp;GNU C Library 2.31 or later</th>
<th class="tg-baqh">OS (Only 64 bit)</th>
<td class="tg-baqh">Windows 8 or higher</td>
<td class="tg-baqh">Mac OS 10.14 or higher</td>
<td class="tg-baqh">Any Linux supports Gnome, KDE, or Unity DE;&nbsp;&nbsp;GNU C Library 2.31 or later</td>
</tr>
<tr>
<td class="tg-baqh"><p align="center">CPU (Only 64 bit)</td>
<th class="tg-baqh"><p align="center">CPU (Only 64 bit)</th>
<td class="tg-baqh">x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a <br><a href="https://developer.android.com/studio/run/emulator-acceleration#vm-windows" target="_blank" rel="noopener noreferrer"><span style="text-decoration:var(--devsite-link-text-decoration,none)">Windows Hypervisor</span></a></td>
<td class="tg-baqh">ARM-based chips, or 2nd generation Intel Core or newer with support for <br><a href="https://developer.android.com/studio/run/emulator-acceleration#vm-mac" target="_blank" rel="noopener noreferrer"><span style="text-decoration:var(--devsite-link-text-decoration,none)">Hypervisor.Framework</span></a></td>
<td class="tg-baqh">x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3</td>
</tr>
<tr>
<td class="tg-baqh"><p align="center">RAM</td>
<th class="tg-baqh"><p align="center">RAM</th>
<td class="tg-baqh" colspan="3"><p align="center">8GB or more</td>
</tr>
<tr>
<td class="tg-baqh"><p align="center">Disk</td>
<th class="tg-baqh"><p align="center">Disk</th>
<td class="tg-baqh" colspan="3"><p align="center">At least 30GB free space. SSD is recommended.</td>
</tr>
<tr>
<td class="tg-baqh"><p align="center">Resolution</td>
<th class="tg-baqh"><p align="center">Resolution</th>
<td class="tg-baqh" colspan="3"><p align="center">1280 x 800 Minimum <br></td>
</tr>
<tr>
<td class="tg-baqh"><p align="center">Internet</td>
<th class="tg-baqh"><p align="center">Internet</th>
<td class="tg-baqh" colspan="3"><p align="center">Broadband</td>
</tr>
</tbody>
Expand Down Expand Up @@ -126,15 +126,16 @@ Git is a program that allows you to track changes in code and to collaborate wit
Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes.
```

```
:class: note
One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time.

Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](TODO).
```
Any version of Android Studio like version Hedgehog or any newer is suitable. With version Ladybug, you might need to do one extra step, but it's doable!

One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time.
```{admonition} Different UI
:class: warning
Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI).
```

Any version of Android Studio from version Hedgehog is suitable. With version Ladybug, you might need to do one extra step, but it's doable! Download the current version of Android Studio from [Android Studio Download](https://developer.android.com/studio), or an older version from the [**Archives**]](https://developer.android.com/studio/archive) and accept the download agreements.
Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements.

![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png)

Expand Down Expand Up @@ -246,13 +247,13 @@ Only for Windows users: If your firewall asks for permission, grant access:

After the repository is cloned successfully, Android Studio will open the cloned project.

(NewUI)=
```{admonition} New UI
:class: information
Android Studio changed its UI recently. New installations of Android Studio use the new UI by default!
```{admonition}
Android Studio changed its UI recently.
New installations of Android Studio use the new UI by default!
Only if your Android Studio looks different, you might need to switch to the new UI.
Click on the hamburger menu on the top left, then select "Setting" (or "Preferences on Apple computers).
Only if your Android Studio looks different, you might need to switch to the new UI:
Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers).
In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it.
If you don't find the option **New UI** don't worry: you are already using it!
Expand All @@ -271,7 +272,7 @@ Android Studio will start a "Gradle project sync" automatically, which will take
Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties.
```

Only on windows computers, you might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster!
Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster!

![Windows Defender](../images/Building-the-App/037_WindowsDefender.png)

Expand Down Expand Up @@ -318,7 +319,8 @@ Android requires each app to be _signed_, to ensure that it can only be updated
For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app.
```

> Make sure the gradle sync is finished successfully before proceeding!

**Important: Make sure the gradle sync is finished successfully before proceeding!**


Click the hamburger menu on the top left to open the menu bar.
Expand Down
43 changes: 11 additions & 32 deletions docs/EN/Installing-AndroidAPS/troubleshooting_androidstudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Gradle Sync can fail to various reasons. Wen you get a message saying that gradl
These are the usual gradle sync failures:
* [Uncommitted changes](troubleshooting_androidstudio-uncommitted-changes)
* [No cached version of ... available](troubleshooting_androidstudio-could-not-resolve-no-cached-version)
* [Android Gradle requires Java 11 to run](troubleshooting_androidstudio-android-gradle-plugin-requires-java-11-to-run)
* [Incompatible Gradle JVM](incompatible-gradle-jvm)
* [Incompatible version of the Android Gradle plugin](incompatible-version-of-android-gradle-plugin)

*Important*:
After you have followed the instructions for your specific problem, you need to trigger the [gradle sync](troubleshooting_androidstudio-gradle-resync) again.
Expand Down Expand Up @@ -103,15 +104,16 @@ If you receive a failure message like

#### Step 3: Resync Gradle (again)

Follow the instructions at [Gradle Resync](troubleshooting_androidstudio-step-3-gradle-resync).
Follow the instructions at [Gradle Resync](gradle-resync).

(troubleshooting_androidstudio-android-gradle-plugin-requires-java-11-to-run)=

(incompatible-gradle-jvm)=
### Incompatible Gradle JVM ###

![Incompatible Gradle JVM](../images/studioTroubleshooting/160_InkompatibelAndroidGradleJVM.png)
If you experience the following error message, you need to download a correct JVM version before you can try again:
* Open the gradle view and its settings on the right side of Android Studio:
* Open the gradle view by clicking on the elephant (1) on the right side of Android Studio and open the settings (2) and select **Gradle Settings** (3):

![Open Gradle Settings](../images/studioTroubleshooting/161_GradleSettings.png)

Expand All @@ -121,11 +123,12 @@ Follow the instructions at [Gradle Resync](troubleshooting_androidstudio-step-3-

* At **Version** (1), you need to select **17**. Then select the **JetBrains Runtime** from the **Vendor** (2) options. Do not change the **Location** (3).

![Select JDK 17](../images/studioTroubleshooting/162_DownloadJDK.png)
![Select JDK 17](../images/studioTroubleshooting/163_JDKSelection.png)

* Close the **Settings** dialog with **OK**.
* You now need to restart the Gradle Sync. Follow the instructions at [Gradle Resync](troubleshooting_androidstudio-step-3-gradle-resync).
* You now need to restart the Gradle Sync. Follow the instructions at [Gradle Resync](gradle-resync).

(incompatible-version-of-android-gradle-plugin)=
### Incompatible version of Android Gradle plugin

If you experience the following error message
Expand All @@ -135,30 +138,7 @@ Follow the instructions at [Gradle Resync](troubleshooting_androidstudio-step-3-
You are using an outdated version of Android Studio.
In the menu, go to Help > Check for updates and install any updates of Android Studio and its plugins that are found.

### Android Gradle plugin requires Java 17 to run

You might experience this error message:

![Android Gradle plugin requires Java 17 to run](../images/studioTroubleshooting/11_GradleJDK.png)

Click on "Gradle Settings" (1) to go to open the gradle settings.

If you don't have the link to the "Gradle Settings", open the Gradle settings manually by selecting the Gradle Tab on the right border (1), select the tools icon (2) and there the item 'Gradle Settings' (3).

![Gradle Settings](../images/studioTroubleshooting/09_GradleSettings.png)

When you have opened the Gradle settings dialog, open the options (1) at "Gradle JDK" and selected the "jbr-17" (2), which should be located within your Android Studion installation directory.

![Gradle Settings](../images/studioTroubleshooting/12_GradleSettingsJDK.png)

Press "OK" to save and close the settings dialog.

*Important*: If you don't see the setting "Gradle JDK", you might have not updated Android Studio. Make sure you are using Android Studio 2022.3 Giraffe) or newer.

Now you need to trigger a [Gradle Resync](troubleshooting_androidstudio-step-3-gradle-resync)

(troubleshooting_androidstudio-could-not-resolve-no-cached-version)=

### Could not resolve/No cached version

You might get this error message:
Expand All @@ -171,19 +151,18 @@ Follow the instructions at [Gradle Resync](troubleshooting_androidstudio-step-3-

![Gradle Offline Mode](../images/studioTroubleshooting/10_GradleOfflineMode.png)

* Now you need to trigger a [Gradle Resync](troubleshooting_androidstudio-step-3-gradle-resync)
* Now you need to trigger a [Gradle Resync](gradle-resync)

(troubleshooting_androidstudio-unable-to-start-daemon-process)=
### Unable to start daemon process

If you see an error message like the one below you probably use a Windows 10 32-bit system. This is not supported by Android Studio 3.5.1 and above and unfortunately nothing the AAPS developer can do about.

If you are using Windows 10 you must use a 64-bit operating system.
If you see an error message like the one below you probably use a Windows 10 32-bit system. This is not supported by Android Studio 3.5.1 and above and unfortunately nothing the AAPS developer can do about!

There are a lot of manuals on the internet how to determine wether you have a 32-bit or 64-bit OS - i.e. [this one](https://support.microsoft.com/en-us/windows/32-bit-and-64-bit-windows-frequently-asked-questions-c6ca9541-8dce-4d48-0415-94a3faa2e13d).

![Screenshot Unable to start daemon process](../images/AndroidStudioWin10_32bitError.png)

(gradle-resync)=
### Gradle Resync

If you can still see the message that the gradle sync failed, now select the Link "Try again".
Expand Down

0 comments on commit ef34884

Please sign in to comment.