Status Update
Comments
an...@jetbrains.com <an...@jetbrains.com>
ar...@google.com <ar...@google.com>
pe...@google.com <pe...@google.com>
du...@google.com <du...@google.com> #2
Looks like you fixed (fc99907ceb6da08c2b76c0ee73740f972cf1f27a) a couple of minutes after you filed the bug?
an...@jetbrains.com <an...@jetbrains.com> #3
Not really. I've implemented an ugly workaround: check if Android facet exists first and only then offer an APK editor. This solution is not correct, because:
- There may be projects with configured Android facet and misconfigured Android SDK => exception
- In IDEA user may have configured Android SDK while working with non-android project. Why should we prevent them from opening APK files even though there are no Android facets in the project?
In other words, the check should be "Android SDK is properly configured", not "Android facet present"
du...@google.com <du...@google.com> #4
Got it, good thing I didn't revert my WIP! XD
du...@google.com <du...@google.com> #5
I submitted a fix on our end. The ChangeID is I60cb678f545124e8183e19bc60283f1048e6811f.
an...@google.com <an...@google.com> #6
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 Ladybug Feature Drop | 2024.2.2 Canary 3
- Android Gradle Plugin 8.8.0-alpha03
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!
Description
Android Plugin 4.0, 4.1 in 2020.2, 2020.3, 2021.1. Earlier versions also affected.
Reported here:https://youtrack.jetbrains.com/issue/IDEA-244008 . See also IDEA-198719 and all its duplicates for different scenarios.
Steps
zip
file to the projectExpected
ZIP file is opened
Actual
Android plugin intercepts the open action, tries to open zip file and fails with the exception
Pre-discussed with @Yuriy Solodkyy. On one hand, there is no clean way to identify that Android SDK is not configured (because there are no dependencies
android.apkanalyzer>android.core
, and introducing them does not look right, so classesIdeSdks
andAndroidSdks
are not available in theApkEditorProvider
). On the other hand,ApkViewPanel
should not even try to invokeProjectSystemUtil.getProjectSystem(myProject)
for non-android project.It would also be nice if SDK management was moved out of
android.core
, so other IDEs (like Rider) could use it easily. At JB we have team capacity to implement this.