Status Update
Comments
ch...@google.com <ch...@google.com> #2
I believe you've been looking into this
at com.android.tools.idea.gradle.project.sync.idea.SdkSyncUtil.findMatchingSdkForAddon(SdkSyncUtil.kt:175)
at com.android.tools.idea.gradle.project.sync.idea.SdkSyncUtil.computeSdkReloadingAsNeeded(SdkSyncUtil.kt:127)
ch...@google.com <ch...@google.com> #3
hm, in fact let's discuss how we handle SDKs/addons etc. and also bootlclasspath
. We have an open issue with not supporting useLibrary
which we need to fix.
ap...@google.com <ap...@google.com> #4
The issue seems to be in
// Find the path to the android.jar, so we can match this to the sdks and find which one is in use.
val androidJarPath = bootClasspath.map { path ->
File(path)
}.firstOrNull { file ->
file.name == FN_FRAMEWORK_LIBRARY
} ?: return null
// There is no android.jar file in the bootClasspath, we can't find the SDK
// TODO: Maybe log here, this condition should never happen AFAIK.
return allAndroidSdks.first { sdk ->
sdk.rootProvider.getFiles(CLASSES).any { sdkFile ->
filesEqual(virtualToIoFile(sdkFile), androidJarPath)
}
}
i.e. it seems that android.jar
from the bootclasspath (as reported by AGP) is not found in any of Android SDKs registered with the IDE.
Al, do you modify bootclasspath for you project in some way? Also, can you please share a small project that reproduces the issue?
Bradley, you made some changes in this area in the past, does this ring a bell?
ap...@google.com <ap...@google.com> #5
Unfortunately I can't share that publicly, but would that trigger the issue? Is there some kind of filter on allAndroidSdks which only includes Google sourced SDKs? The reason I'm asking is we've seen issues trying to run apps from AS where our custom SDK is selected, and compiles the code without an issue, but AS pops up a "Please select an Android SDK" error.
ap...@google.com <ap...@google.com> #6
This is probably caused by allAndroidSdks
will be empty, and even though there is file with name android.jar
in bootclasspath, the code above will fail?
ap...@google.com <ap...@google.com> #7
ap...@google.com <ap...@google.com> #8
Thanks for confirming that, we'll aim to fix this issue.
ap...@google.com <ap...@google.com> #9
This will be fixed in upcoming Android Studio Flamingo canaries/betas.
Change: I10b962c387dbac48d047efafddcb7b4d4de3257d
ga...@linecorp.com <ga...@linecorp.com> #10
Hello.
I tried to check with this change.
But
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Details>No such object: r8-releases/raw/com/android/tools/r8/8.8.31/r8-8.8.31.pom</Details>
</Error>
ap...@google.com <ap...@google.com> #11
Project: r8
Branch: 8.8
Author: Christoffer Adamsen <
Link:
Version 8.8.32
Expand for full commit details
Version 8.8.32
Bug: b/394185143
Change-Id: I2b4a23b67aabfa2582d2011ce811ac3f8f3fcdb2
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: 2aed3efa54f965c7f02f69ce980e8178f9fd3db9
Date: Thu Feb 06 08:46:34 2025
ch...@google.com <ch...@google.com> #12
Sorry about that, there was an error archiving 8.8.31. Please try with 8.8.32.
an...@google.com <an...@google.com> #13
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 RC 2
- Android Gradle Plugin 8.9.0-rc02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
an...@google.com <an...@google.com> #14
The fixes for this issue are now also available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Patch 2
- Android Gradle Plugin 8.8.2
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
op...@gmail.com <op...@gmail.com> #15
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
kop.ruleFiles.put(name, [kop.getDefaultKopFile('kop-android-default.txt'), '
Issue:
java.lang.IllegalStateException: The value for this file collection cannot be changed any further
Description
Gson proguard rules is not working properly after upgrading to AGP 8.8
after a lot of testing, I believe this commit in R8 broke it, causing R8 to remove
<init>()
methodunfortunately, I can not reproduce this bug in a new project
the bug is still occurs in latest commit
5f9f76f286c6ea3cae34de83d8ab8ab9d74d398b