Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
Fix (pending) is I2c2dc7b600603ee430fd0d91b23d52ea8aa29ca9.
cm...@google.com <cm...@google.com>
je...@google.com <je...@google.com>
cm...@google.com <cm...@google.com> #3
lb...@gmail.com <lb...@gmail.com> #4
#sdkmanager --package_file=${PATH_WORKSPACE}/packages
while read p; do echo "y" | sdkmanager "${p}"; done <${PATH_WORKSPACE}/packages
lb...@gmail.com <lb...@gmail.com> #5
cm...@google.com <cm...@google.com> #6
lb...@gmail.com <lb...@gmail.com> #7
cm...@google.com <cm...@google.com> #8
lb...@gmail.com <lb...@gmail.com> #9
cm...@google.com <cm...@google.com> #10
```
(15:58:11) C02W513SHTD8:files aso$ /opt/android-sdk-macosx/tools/bin/sdkmanager --version
26.1.1
(15:58:17) C02W513SHTD8:files aso$ /opt/android-sdk-macosx/tools/bin/sdkmanager --install --package_file=package_file
Warning: Unknown argument --package_file=package_file
```
lb...@gmail.com <lb...@gmail.com> #11
vm...@google.com <vm...@google.com> #12
lb...@gmail.com <lb...@gmail.com> #13
vm...@google.com <vm...@google.com> #14
lb...@gmail.com <lb...@gmail.com> #15
vm...@google.com <vm...@google.com> #16
Has anyone re-tried it?
We switched back to RUN sdkmanager --package_file=$ANDROID_HOME/packages.txt
in our Dockerfile back in March of 2021.
lb...@gmail.com <lb...@gmail.com> #17
For what it's worth, I did a quick test with the latest CLI: 11076708 (
./sdkmanager --sdk_root="../sdk" --package_file=deps.txt
Deps.txt:
platform-tools
extras;google;instantapps
build-tools;35.0.0-rc3
So perhaps this is now resolved? I haven't tried it with more packages
vm...@google.com <vm...@google.com> #18
On the APPDATA
is for example C:\Users\YourUserName\AppData\Roaming
:
%APPDATA%\Google\AndroidStudio-VERSION\options\jdk.table.xml
lb...@gmail.com <lb...@gmail.com> #19
Choosing on AndroidStudioPreview2022.3 which seems the latest for canary (how is it 2022?), I deleted the file jdk.table.xml there and then started the IDE.
Then it asked me which JDK to use for gradle.
Then as it opened an existing project, it marked plenty of things in red, related to view-binding, as if they don't exist. Restarting the IDE fixed it.
For a new project, the issue of needing to change gradle JDK version is gone.
In any case, the original issue that I talked about needs fixing.
Please also improve the settings and backward compatibility.
vm...@google.com <vm...@google.com> #20
This exception is linked with JDK < 17
, on studio version using JDK 17. I was able to reproduce it on a sample project with the following configuration:
JDK 11
Gradle 7.2.0
AGP 4.2.2
The project builds properly from the command line and as a workaround, you need to update your project to the most recent AGP/Gradle version that require JDK 17. In any case, a fix will land soon on AS H Canary 2
and will also be cherrypicked on AS G Beta 3
. Please feel free to retest the mentioned versions. Thank you
lb...@gmail.com <lb...@gmail.com> #21
I see this a lot, that an "old" project (can even be just 1 year old) can't be opened anymore, and requires various manual steps while the IDE doesn't help much at all, showing "random" errors without any useful clue about what's wrong.
Maybe offer for all build-errors (or at least those that IDE fails to offer a good quick-fix, or when we tried its quick-fix, and it still failed) an automatic check that gets added, to upgrade what you've written (gradle and AGP).
ja...@gmail.com <ja...@gmail.com> #24
Caused by: java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9
at org.objectweb.asm.ClassVisitor.visitPermittedSubclass(ClassVisitor.java:281)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:707)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)
at com.android.build.gradle.tasks.DependenciesAnalyzer.visitClass(DependenciesAnalyzer.kt:70)
This issue is because:
class DependenciesAnalyzer {
private val asmVersion = Opcodes.ASM7
}
Description
Example attached here.
Please have a better backward compatibility on the IDE, offer proper information that we can do something about it, and offer a quick-fix for each case that is known.