@@ -24,15 +24,21 @@ to verify that your system satisfies the list of minimum requirements:
24
24
* `MacOS <https://developer.android.com/codelabs/basic-android-kotlin-compose-install-android-studio#3 >`__
25
25
* `Linux <https://developer.android.com/codelabs/basic-android-kotlin-compose-install-android-studio#5 >`__
26
26
27
- Java Development Kit
28
- ~~~~~~~~~~~~~~~~~~~~
29
27
30
- Earlier versions of Android Studio required that the user install the
31
- Java Development Kit software separately. Current versions of Android
32
- Studio incorporate the Java development software as part of the entire
33
- install package. It is no longer necessary (or recommended) to install
34
- the Java Development Kit separately. Instead, it is recommended that you
35
- use the Java Development Kit that is included with Android Studio.
28
+ .. caution ::
29
+
30
+ With the introduction of **Android Studio Ladybug **, the JDK that is packaged with
31
+ Android Studio is incompatible with the FtcRobotController workspace. If you install
32
+ or update an existing installation to Android Studio Ladybug, you will need to install
33
+ JDK 17 separately.
34
+
35
+ Upon initial load of the FtcRobotController workspace using Android Studio Ladybug,
36
+ an error will be displayed during the Gradle sync and Android Studio will recommend that
37
+ you upgrade Gradle. Do not upgrade Gradle.
38
+
39
+ For more detailed instructions see: Configuring
40
+
41
+
36
42
37
43
Downloading and Installing Android Studio
38
44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -64,3 +70,76 @@ Once the setup package has downloaded, launch the application and follow
64
70
the on-screen instructions to install Android Studio.
65
71
66
72
73
+ Configuring Android Studio (Ladybug and later)
74
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
+
76
+ .. note ::
77
+
78
+ See the Caution above for why this is necessary.
79
+
80
+ .. note ::
81
+
82
+ Android Studio Ladybug updates the underlying JetBrains IntelliJ version such that
83
+ the interface is a VSCode look alike. The screenshots in this documentation use the
84
+ JetBrains/Android Studio Classic UI which is no longer supported natively by JetBrains.
85
+ To follow along, users should install the `Classic UI <https://plugins.jetbrains.com/plugin/24468-classic-ui >`__ plugin.
86
+
87
+
88
+ #. `Install JDK 17 <https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html >`__
89
+ If you did not already have this installed independently of Android Studio.
90
+ e.g. If you were using Android Studio’s bundled JDK, then when Ladybug is installed Android Studio
91
+ will unhelpfully overwrite your old bundled JDK version. Note there’s a bug in the Settings → Build Tools → Gradle dialog
92
+ that may make you think your old version of the JDK is there, but it is not. You must use an unbundled version of the JDK.
93
+
94
+ #. Go to File -> Settings and under Build, Execution, Deployment -> Build Tools -> Gradle use the Add JDK from disk option
95
+ to select the newly installed JDK 17. In the image below take careful note of the directory paths
96
+ for the options labeled jbr-17 and jbr-21. Note that they are the same. This is the aforementioned UI bug,
97
+ and that is Android Studio overwriting your old JDK. In this image you’ll see I’ve selected the JDK that
98
+ was installed independently.
99
+
100
+ .. image :: images/AndroidStudioSelectJdk.png
101
+ :align: center
102
+
103
+ |
104
+
105
+ Do Not Upgrade Gradle
106
+ ~~~~~~~~~~~~~~~~~~~~~
107
+
108
+ If you have upgraded Android Studio from an earlier version to Ladybug, or you did not install and
109
+ configure the JDK prior to loading a FtcRobotController workspace, then Android Studio may present an
110
+ error and recommend that you upgrade Gradle.
111
+
112
+ .. image :: images/AndroidStudioUpgradeGradle.png
113
+ :align: center
114
+
115
+ |
116
+
117
+ Do not do this. The FtcRobotController build is incompatible with upgraded Gradle. If you do, you
118
+ will presented with another, even more, indecipherable error.
119
+
120
+ To recover, you need to rollback the changes that Android Studio made upon that click.
121
+ To do that select Git -> Uncommitted Changes -> Show Shelf
122
+
123
+ .. image :: images/AndroidStudioRecoverUpgrade.png
124
+ :align: center
125
+
126
+ |
127
+
128
+ That will show the changes you have in your workspace. You want to rollback the 4 gradle files shown in the
129
+ following image. You can either select the Changes checkbox to select all files, or individually select the
130
+ gradle files. Note that if you have changes in your workspace that haven’t been committed, you want to be
131
+ careful not to select those files or you may lose work.
132
+
133
+ .. image :: images/AndroidStudioRollback.png
134
+ :align: center
135
+
136
+ |
137
+
138
+ Once you have the proper files selected, click the Rollback button.
139
+
140
+ Resync and that should revert you to the error that prompted you to upgrade Gradle in the first place.
141
+ From there follow the instructions above to install JDK 17.
142
+
143
+
144
+
145
+
0 commit comments