Status Update
Comments
ne...@gmail.com <ne...@gmail.com> #2
I don't think the average developer understands the distinction between method references and method definitions in this context (inside a DEX file). I know I don't.
@jvg, can you elaborate?
sh...@google.com <sh...@google.com>
sa...@google.com <sa...@google.com> #3
people who are looking at the bytecode in the dex to optimize their app through shrinking hopefully will learn the difference as string tables for method references between various dex files can account for quite a bit of disk space. but more importantly a definition is something you can analyze its code for where a reference you can't so the UI can be confusing without seeing the difference
ka...@google.com <ka...@google.com> #4
How about something like this?
I think having defined members be directly under the class node while references are nested in a group makes more sense.
Also note that the method refs have a
ne...@gmail.com <ne...@gmail.com> #5
sounds reasonable to me, thanks
ka...@google.com <ka...@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 4
- Android Gradle Plugin 8.8.0-alpha04
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!
ka...@google.com <ka...@google.com> #7
This is now fixed and will be available in the next Android Studio release. Thank you for reporting.
an...@google.com <an...@google.com> #8
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!
ad...@salesforce.com <ad...@salesforce.com> #9
I've tried this with Canary 4 for ladybug and I can still reproduce this issue. Not really sure what I might be doing wrong.
ka...@google.com <ka...@google.com> #10
Ok can you please than share more details here about how do you rep[roduce and what do you see in steps like the initial reporter dd above ?
Most importantly: can you see a file named runConfigurations.xml
under your .idea
folder and please share it's content if you have it.
Thanks.
sl...@pentacomp.pl <sl...@pentacomp.pl> #11
I have the same problem. Just installed Ladybug stable and tried to run the test with side icon next to single test - it starts the test as Junit test configuration witch as stated above does not work and should not be even visible...
When selecting the side icon there are 3 options to run, first one have itelliJ test icon, other ones have gradle icon, but are truncated and i'm unable to see what they are for (screenshot attached). Once i selected the wrong configuration I had to remove that wrong run configuration, then i was able to select the proper one (second option).
I think best resolution would be if the junit runner option was removed from sidebar selection menu and make submenu larger to be able to see which option is to run single test and which is for all test in file.
ka...@google.com <ka...@google.com> #12
Please refer to comment 10 above as we need more info to understand why you are seeing this.
Thank you.
sl...@pentacomp.pl <sl...@pentacomp.pl> #13
You can find my runConfigurations.xml file attached.
ka...@google.com <ka...@google.com> #14
Thank you for attaching the file. Could I please ask you to Sync your project and check this file again to see if its content changed by any chance ?
sl...@pentacomp.pl <sl...@pentacomp.pl> #15
No, the content stayed the same. Also i checked other project i have on disk and was not yet opened in AS Ladybug (or even with new UI if that matters) - there wasn't file until I opened project in new AS and it was created with the same content.
ka...@google.com <ka...@google.com> #16
I need some more details about your project setup to be able to reproduce the issue. Is there a possibility to share a repro project for this by any chance please ?
sl...@pentacomp.pl <sl...@pentacomp.pl> #17
Unfortunately I cannot share my project, but I was able to reproduce it just by creating new empty activity project (attached).
I also tried to remove all "AndroidStudio###" folders in appdata/local/google
and appdata/roaming/google
to make sure it is like new user experience. Still got runConfigurations.xml
file created with the same content.
Here are also details from Android Studio about page:
Android Studio Ladybug | 2024.2.1
Build #AI-242.21829.142.2421.12409432, built on September 24, 2024
Runtime version: 21.0.3+-12282718-b509.11 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 10.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
ide.experimental.ui=true
ka...@google.com <ka...@google.com> #18
As a workaround, if you delete the runConfigurations.xml
file and re-open your project, you will not be seeing this issue anymore. We will work on a fix for this for the next release. Sorry for the inconvenence.
ba...@gocity.com <ba...@gocity.com> #19
I tried the workaround above but I'm still getting the issue. What should actually be added/removed in the runConfigurations.xml
for the JUnit option to no longer be presented?
ka...@google.com <ka...@google.com> #20
Ok For now you can replace the file's content with this
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>
Then do same of closing and re-opening your project ( No need for Sync). We're working on a fix and trying to get it available ASAP.
ra...@gmail.com <ra...@gmail.com> #21
ka...@google.com <ka...@google.com> #22
We have a WIP fix for this and we will try have it available for PATCH 2 latest.
Thank you.
kr...@gmail.com <kr...@gmail.com> #23
ka...@google.com <ka...@google.com> #24
We're actually working to get this in for patch 1 ths week, just bare with us! thank you
ka...@google.com <ka...@google.com> #25
Thank you for your patience. This issue's fix will now be available in the LB.1 Patch 1 which is set to be released on Monday 14th, of October.
ka...@google.com <ka...@google.com>
an...@google.com <an...@google.com> #26
The fixes for this issue are now also available in:
- Android Studio Ladybug | 2024.2.1 Patch 1
- Android Gradle Plugin 8.7.1
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> #27
Further fixes for this issue are now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 6
- Android Gradle Plugin 8.8.0-alpha06
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description
Summary:
Tests running in an Android Studio project with the Ladybug Feature Drop (build #AI-242.21829.142.2422.12345034) fail to initialize classes located outside of the "test" source set. This results in a
java.lang.NoClassDefFoundError
when attempting to use these classes within tests.Expected Behavior:
Tests should be able to initialize and use classes from any source set within the project, including the "main" source set.
Actual Behavior:
java.lang.NoClassDefFoundError
.Steps to Reproduce:
com.example. MyClass
).MyClass testObject = new MyClass();
).Observed Result:
The test fails with a
java.lang.NoClassDefFoundError
forcom.example.MyClass
.Additional Information:
System Information:
Non-Bundled Plugins:
Severity:
This bug can be considered a blocker for development as it prevents tests from interacting with core project functionality.