Status Update
Comments
st...@gmail.com <st...@gmail.com> #2
Our project contains only Android app, Android library and pure JVM modules for reference, all are 100% Kotlin.
kn...@google.com <kn...@google.com>
be...@citymapper.com <be...@citymapper.com> #3
Looks similar to
I have been occasionally getting sync failures which seem related to this, and are only resolved with a restart of the IDE. I'll attach a log next time it happens.
ga...@google.com <ga...@google.com>
ga...@google.com <ga...@google.com> #4
I've double checked with OP and the issue in their case was that modules/.idea/modules/foo/bar/app.foo.bar.main.iml
had
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../../../../foo/bar/src/debug">
<sourceFolder url="file://$MODULE_DIR$/../../../../foo/bar/src/debug/res" type="java-resource" />
</content>
</component>
</module>
This may happen with right click, Mark Directory as
-> Resources root
. In G and below, this causes NewModuleRootManager
component to be added, which breaks loading in H. Starting from H, AdditionalModuleElements
is used that does not cause this problem.
Workaround
Delete $ROOT_PROJET/.idea/modules
directory.
Re #3: Ben, can you please double check the content of *.iml files under .idea/modules
and confirm if it is the same issue?
eu...@gmail.com <eu...@gmail.com> #5
My issue it fixed! Please close it whenever Ben confirms his findings.
be...@citymapper.com <be...@citymapper.com> #6
I don't see anything with a type of "java-resource" in the .iml files. The modules it flags are a combination of androidTest modules, which all have content similar to e.g
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="TestModuleProperties" production-module="app-name.feature-module.public.main" />
</module>
and unitTest modules, which have a much longer file.
Deleting the $ROOT_PROJECT/.idea/modules
directory has cleared the message up. I did do this before though and the warning returned after a while (I might have synced with G again?)
vm...@google.com <vm...@google.com> #7
First of all, thank you for the reported issue. This .idea
modules *.iml
files using NewModuleRootManager
component that are not linked to Gradle. Those are generated by the studio itself or can also be manually added by the user. The AS Hedgehog
addresses this by AdditionalModuleElements
. However, there's no migration process meaning that old projects that are using old tags will still face the issue unless they manually clean up their .idea
directory, in case those weren't added intentionally.
We improved the notification by adding a button that removes those unsupported modules, changes that will land on AS Hedgehog Beta 3
. Meantime as a manual workaround, you can remove from your project root the .idea/modules directory
and .idea/modules.xml
file, triggering the invalidate caches option after. I hope this makes sense, Thank you.
to...@yahoo.com <to...@yahoo.com> #8
the workaround works fine on Hedgehog beta1 - Thank you!
an...@google.com <an...@google.com> #9
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 Iguana | 2023.2.1 Canary 2
- Android Gradle Plugin 8.3.0-alpha02
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> #10
The fixes for this issue are now also available in:
- Android Studio Hedgehog | 2023.1.1 Beta 3
- Android Gradle Plugin 8.2.0-beta03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
an...@google.com <an...@google.com> #11
Further fixes for this issue are now available in:
- Android Studio Iguana | 2023.2.1 Canary 16
- Android Gradle Plugin 8.3.0-alpha16
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
to...@yahoo.com <to...@yahoo.com> #12
This issue is back again and happening at (almost) every Studio restart. There is once again the need to manually remove the "modules" directory and restart a second time.
by adding a button that removes those unsupported modules
does not seem to do anything at all.
Android Studio Koala Feature Drop | 2024.1.2 RC 1 Build #AI-241.18034.62.2412.12169539, built on August 1, 2024 Runtime version: 17.0.11+0--11852314 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 GC: G1 Young Generation, G1 Old Generation Memory: 12288M Cores: 20 Registry: ide.browser.jcef.testMode.enabled=true ide.browser.jcef.sandbox.enable=false Non-Bundled Plugins: CheckStyle-IDEA (5.92.0) name.kropp.intellij.makefile (241.14494.150) artsiomch.cmake (241.1.1)
Description
I've seen warning (see also screenshot):
Not sure what it means since we don't have non gradle java modules.
Build: AI-231.9225.16.2311.10647019, 202308111902
AI-231.9225.16.2311.10647019, JRE 17.0.7+0-17.0.7b1000.6-10550314x64 JetBrains s.r.o., OS Mac OS X(aarch64) v13.5, screens 3456.0x2234.0, 6016.0x3384.0; Retina
AS: Hedgehog | 2023.1.1 Canary 16 Kotlin plugin: 231-1.8.21-release-380-AS9225.16.2311.10647019 Android Gradle Plugin: 8.1.1 Gradle: 8.3 Gradle JDK: Azul Zulu version 20.0.2 NDK: from local.properties: (not specified), latest from SDK: (not found) CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)