Assigned
Status Update
Comments
ra...@google.com <ra...@google.com> #3
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:https://developer.android.com/studio/debug/bug-report#bugreportdevice
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report to google drive and share the folder to android-bugreport@google.com, then share the link here.
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report to google drive and share the folder to android-bugreport@google.com, then share the link here.
lo...@gmail.com <lo...@gmail.com> #4
Hello, I think the OP already provided the reproducing code and all the needed details.
Can you answer the questions they asked?
ra...@google.com <ra...@google.com> #5
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
Description
1. Create a third-party library containing removeFirst()
2. Use the third-party library in an app compiled with SDK 35
3. Write the same code inside my app
4. Run on an Android 14 device -> The third-party library works fine but my own app crashes with the same code inside my project
Questions:
1. Why does removeFirst() from a third-party library work fine, but calling it directly in my app crashes?
2. Is there a difference in how ART/Dex processes removeFirst() from an AAR/JAR vs. app code?
3. Could desugaring or runtime method resolution affect this behavior?
4. What is the correct way to use removeFirst() safely across Android versions?
Additional Debugging Info:
1. Tested on Android 14.
2. Used AGP v8.5.2 and Gradle v8.7
3. targetSdkVersion = 35.
4. App was tested without Proguard/R8/Dexguard.
Code example:
class CallMeToCheck {
private val list = mutableListOf("a", "b", "c")
fun call(): List<String> {
list.removeFirst()
return list
}
}