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

Add warning about Android Studio Ladybug #320

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

cmacfarl
Copy link
Member

Potentially head off confusion surrounding Ladybug's incompatible JDK.

@qwertychouskie
Copy link

This feels like a band-aid at best. While I get that upgrading and validating a newer Gradle version takes some work, I think it's very necessary. I am seeing an ever-increasing amount of support requests from users that download Android Studio, download the FTC SDK, then are confused by cryptic error messages. Unless we put a giant red banner in 15 different places, users are unlikely to see the warning (and may not understand it even if they see it). I'm actually downloading Ladybug right now so I can start playing around with Gradle/JDK/AGP versions (I'm pretty familiar with this stuff as it I just recently had to update Gradle across a bunch of different repositories at my day job).

@qwertychouskie
Copy link

qwertychouskie commented Oct 17, 2024

(Re-posted from FIRST-Tech-Challenge/FtcRobotController#1174 (comment))

I figured out the full set of things needed to fix building with newer Android Studio versions:

https://gist.github.com/qwertychouskie/1a9ac65f99453a27a6ae19bd969de7d0

While there is still work to do to move away from deprecated features/functionality, this gets things building again and generally functional. Ideally Gradle could be upgraded all the way to 8.9 and com.android.tools.build:gradle to 8.7.1, but I have not yet tested that, as I wanted a more conservative upgrade to start with to get the FTC SDK building again for people as soon as possible.

(Based on FTCTeam10298/2023-24-code@4ed572c, thanks @stupenrose for figuring out a bunch of this last season)

@cmacfarl
Copy link
Member Author

This feels like a band-aid at best. While I get that upgrading and validating a newer Gradle version takes some work, I think it's very necessary. I am seeing an ever-increasing amount of support requests from users that download Android Studio, download the FTC SDK, then are confused by cryptic error messages.

While I agree that we find ourselves in a non-optimal situation, characterizing a good faith effort to document a problem that teams are encountering today as a band aid distracts from the fact that teams need to know how to fix this today. To the extent that this helps teams, and provides a place that we can point them to, this documentation, is indeed, necessary.

I will also agree that we need a longer term solution to the problem, however our release planning does not have us producing another release in the near term. And we don't typically make tooling changes mid-season because of the potential disruption. Even if we did cut a special release, that still doesn't solve the problem for teams that update or install a new version of Android Studio but don't also fetch the latest FtcRobotController. Teams don't always, or even often, update in pairs.

There's no magic bullet here. This documentation is necessary.

As an aside, putting your suggested changes in a gist is kind of a hassle. I noticed that your original, unedited version of your comment linked to a private repository, which is probably why it's been edited to be a gist. Is there a reason that your team repository is private in first place?

@cmacfarl
Copy link
Member Author

As an aside, putting your suggested changes in a gist is kind of a hassle. I noticed that your original, unedited version of your comment linked to a private repository, which is probably why it's been edited to be a gist. Is there a reason that your team repository is private in first place

Oops, I mean this https://github.com/FTCTeam10298/2024-25-code/commit/d870f4ea24de41aeb453d1a219c1b8a8c219790e which is referenced here.

@qwertychouskie
Copy link

As an aside, putting your suggested changes in a gist is kind of a hassle. I noticed that your original, unedited version of your comment linked to a private repository, which is probably why it's been edited to be a gist. Is there a reason that your team repository is private in first place

Oops, I mean this FTCTeam10298/2024-25-code@d870f4e which is referenced here.

Here's a public version: acmerobotics/road-runner-quickstart#421 (This version doesn't have the Kotlin JVM target change, since it's seemingly not applicable to the stock SDK.)

(There's probably no real reason to have this year's repo private, but in previous seasons, we would usually make the repo public at the end of the season.)

While I agree that we find ourselves in a non-optimal situation, characterizing a good faith effort to document a problem that teams are encountering today as a band aid distracts from the fact that teams need to know how to fix this today. To the extent that this helps teams, and provides a place that we can point them to, this documentation, is indeed, necessary.

I will also agree that we need a longer term solution to the problem, however our release planning does not have us producing another release in the near term. And we don't typically make tooling changes mid-season because of the potential disruption. Even if we did cut a special release, that still doesn't solve the problem for teams that update or install a new version of Android Studio but don't also fetch the latest FtcRobotController. Teams don't always, or even often, update in pairs.

Having a band-aid is a good first step, I just want to make sure the band-aid isn't treated as a permanent fix. I am seeing a significant number of people unable to get the FTC SDK running, and it seems that number keeps going up. I am trying to direct users to a solution wherever possible, but for every 1 Reddit/Discord/etc post I see asking why the FTC SDK won't compile/run, there's probably 20 people having the same issue that never posted about it.

While updating the Gradle version used internally for developing the SDK is likely an unnecessary risk, updating the Gradle version used by the distributed SDK is much lower risk and less likely to cause issues. (The nice thing about a build system is it either builds or it doesn't, and with this patch, it does build.)


#. Go to File -> Settings and under Build, Execution, Deployment -> Build Tools -> Gradle use the Add JDK from disk option
to select the newly installed JDK 17. In the image below take careful note of the directory paths
for the options labelled jbr-17 and jbr-21. Note that they are the same. This is the aforementioned UI bug,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"labelled" should be "labeled"

@texasdiaz texasdiaz merged commit cab482f into FIRST-Tech-Challenge:main Oct 22, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants