-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Android SDK XML warnings when using a user-provided SDK #827
Comments
When Briefcase runs Gradle, I get the same "unexpected element" warnings as above, plus a few more:
This is because the Android template uses Android Gradle plugin version 4.2, which presumably has an old version of sdkmanager built into it. Again, these warnings appear to be harmless, and they don't affect Briefcase-installed SDKs. But they could be fixed by moving the Android template to a newer version of the Android Gradle plugin (I've confirmed that version 7.2 works without warnings). Unfortunately this won't be simple, because all newer versions require Java 11, but Briefcase only supports Java 8. |
I've been wondering about those warnings on the Briefcase build - I assumed that it was a Gradle/Gradle plugin version thing, but I wasn't certain. Given we're moving to a Chaquopy base, it's not worth modifying the template to fix it; but if Chaquopy will benefit from a version bump on the Android Gradle plugin, then that's worth pursing. If upgrading the Gradle plugin also requires (or would benefit from) a Java 11 update, then that's worth pursuing as well. It shouldn't be too hard to manage - if we modify the Java integration to use a Regarding the cmdline-tools version - it is inevitable that it will eventually become a problem; the introduction of M1 support, for example, was complicated by having an older version of the cmdline-tools. So - although it's not critical right now, we should definitely address this. AIUI, cmdline-tools should be self-upgradable with |
At the moment, there's no benefit, but I'm sure we'll have to do it at some point. Android Gradle plugin version 4.2 is compatible with both Java 8 and 11, so Briefcase could move from 8 to 11 without breaking compatibility with most existing projects, and without needing to support both versions at the same time. It would, however, break compatibility with projects created before August 2021, which used an even older Android Gradle plugin. In general it's acceptable for a Briefcase update to require a project regeneration, but we should come up with a proper way of managing this, rather than just hitting the user with a random error message from the underlying tools. For example, the briefcase.toml could contain a line indicating which version of Briefcase it was generated with, and each Briefcase platform module would have a minimum requirement for that version. If the requirement wasn't met, Briefcase would tell the user they need to either rerun |
Since #832, Briefcase no longer routinely runs |
Android Gradle plugin 8.0 will soon be released along with Android Studio Flamingo, which comes with Java 17. So whenever we decide to update Briefcase's Java version, we might as well skip over 11 and go straight to 17 (#1271). |
Describe the bug
I used the ANDROID_SDK_ROOT environment variable to make Briefcase use my existing Android SDK. This resulted in the following warnings when Briefcase runs
sdkmanager --list_installed
(duplicate lines removed):This is because I usually manage the SDK using Android Studio's graphical SDK Manager (current version: Chipmunk), not the command-line sdkmanager. The cmdline-tools "latest" directory in my SDK is version 5, because I've never had any reason to update it. Version 6 and 7 both work without warnings, so this doesn't affect Briefcase-installed SDKs, which use version 6.
The warnings appear to be harmless, but Briefcase could fix them by installing and using a specific version of cmdline-tools, as discussed at #766 (comment).
Environment:
The text was updated successfully, but these errors were encountered: