Fixed
Status Update
Comments
vm...@google.com <vm...@google.com>
aa...@google.com <aa...@google.com> #2
Looks like ContextWrapper.getClassLoader()
is throwing an NPE.
java_vm_ext.cc:591] JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.ClassLoader android.content.Context.getClassLoader()' on a null object reference
java_vm_ext.cc:591] at java.lang.ClassLoader android.content.ContextWrapper.getClassLoader() (ContextWrapper.java:176)
java_vm_ext.cc:591] at java.lang.ClassLoader com.android.tools.agent.app.inspection.AppInspectionService.findClassLoader() (AppInspectionService.java:435)
java_vm_ext.cc:591] at void com.android.tools.agent.app.inspection.AppInspectionService.<init>(long) (AppInspectionService.java:88)
java_vm_ext.cc:591] at com.android.tools.agent.app.inspection.AppInspectionService com.android.tools.agent.app.inspection.AppInspectionService.createAppInspectionService() (AppInspectionService.java:-2)
java_vm_ext.cc:591] at com.android.tools.agent.app.inspection.AppInspectionService com.android.tools.agent.app.inspection.AppInspectionService.instance() (AppInspectionService.java:55)
java_vm_ext.cc:591]
java_vm_ext.cc:591] in call to FindClass
aa...@google.com <aa...@google.com> #3
I added NPE protection that resorts to a "safe" way to get a classloader.
an...@google.com <an...@google.com> #4
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 2
- Android Gradle Plugin 8.8.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!
on...@gmail.com <on...@gmail.com> #5
I can confirm App inspection works. Thank you for fixing this.
Description
####################################################
Please provide all of the following information, otherwise we may not be able to route your bug report.
####################################################
1. Describe the bug or issue that you're seeing.
I build and run android app on Physical or Virtual android device. Then proceed to open App inspection window, and select debuggable app and waited for a couple of minutes for database inspector to load. However nothing happens. See attached screenshot.
Also stopping and restarting inspection crashes the app See logcat dump.
App is debuggable and I am using a device running API level 34
2. Attach log files from Android Studio
2A. In the IDE, select the Help..Collect Logs and Diagnostic Data menu option.
2B. Create a diagnostic report and save it to your local computer.
2C. Attach the report to this bug using the Add attachments button.
3. If you know what they are, write the steps to reproduce:
3A. Build and run an android app on a physical device or emulator
3B. Open App inspection window
3C. Wait for a couple of minutes and Database Inspector fails to load
3D. Click stop inspection and restarting inspection by selecting a debuggable app crashes the app
In addition to logs, please attach a screenshot or recording that illustrates the problem.
For more information on how to get your bug routed quickly, see
Build: AI-241.18034.62.2412.12266719, 202408222329
AS: Koala Feature Drop | 2024.1.2
AI-241.18034.62.2412.12266719, JRE 17.0.11+0-17.0.11b1207.24-11852314x64 JetBrains s.r.o., OS Mac OS X(x86_64) v14.6.1, screens 1920.0x1080.0
Android Gradle Plugin: 8.6.0
Gradle: 8.7
Gradle JDK: Oracle OpenJDK 18.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: 3.30.2
```