Bug P3
Status Update
Comments
ar...@google.com <ar...@google.com> #2
Thanks for the feedback. To help us troubleshoot this issue further, we will need more information. Please share detailed reproduction steps and as much as possible of the following information when it applies if you haven’t already:
1. Android Studio version and OS type and version
2. Screenshots or videos of the issue
3. idea.log file (select Help > Show Log in Finder / Explorer)
4. Thread dumps if the issue is a freezing or non-responding UI.
For more information on what’s needed and how to obtain this information please read the guide athttps://developer.android.com/studio/report-bugs#studio-bugs
1. Android Studio version and OS type and version
2. Screenshots or videos of the issue
3. idea.log file (select Help > Show Log in Finder / Explorer)
4. Thread dumps if the issue is a freezing or non-responding UI.
For more information on what’s needed and how to obtain this information please read the guide at
Description
The Database Inspector within Android Studio's App Inspection tool fails to display any information about a Room database, even though the database is correctly created, contains data, and is accessible by the application. This issue occurs despite following all recommended setup procedures and verifying the database's integrity. The problem has been reproduced on multiple machines, indicating a potential bug within App Inspection itself.
Steps to Reproduce:
Create a new Android project or use an existing one with Room database integration.
Ensure the Room database is correctly configured with entities, DAOs, and a RoomDatabase class.
Verify that data is being inserted into the database.
Run the application in debug mode on a physical device or emulator.
Open App Inspection in Android Studio.
Select the running application's process.
Observe that the Database Inspector shows no databases, tables, or data, despite the database existing and containing data.
Verify that the option "Stop Inspection" is enabled.
Verify that there are no errors in the Logcat.
Verify that the folder schemas is created and contains the correct information.
Expected Behavior:
The Database Inspector should display the Room database, its tables, and the data within those tables.
Actual Behavior:
The Database Inspector shows no information. The process is correctly selected, and the "Stop Inspection" option is enabled, indicating a partial connection. However, no databases, tables, or data are displayed. There are no error messages in the Logcat or the App Inspection window.
Additional Information:
Database Verification: The database's existence and data integrity have been verified by directly accessing the database file on the device/emulator with root access.
Correct Setup: All recommended setup procedures for Room have been followed, including:
Correct dependencies in build.gradle.kts.
Proper use of @Entity, @Dao, @Database annotations.
Correct kapt configuration.
Correct generation of the schemas folder.
Correct identityHash.
Correct proguard-rules.pro configuration.
No Errors: There are no error messages in Logcat or the App Inspection window.
Partial Connection: The "Stop Inspection" option is enabled, indicating that App Inspection is partially connected to the application process.
Reproducibility: The issue has been reproduced on multiple machines with different configurations, suggesting a bug in App Inspection rather than an environment-specific problem.
Versions: The versions of Android Studio, Gradle and Room are compatible.
Network: There is no firewall or network configuration that is blocking the communication between Android Studio and the device/emulator.
Device/Emulator: There is no configuration in the device/emulator that is interfering with App Inspection.
Access to the database: The access to the database is done correctly.
Initialization of the database: The database is initialized correctly.
Uso de allowMainThreadQueries: allowMainThreadQueries is not being used.
Base de datos simple: This has not been tested.
Configuración de ProGuard/R8: The exclusion rules have been added in the proguard-rules.pro file.
Application configuration: There is no configuration in the application that is interfering with App Inspection.
Other computer: The problem persists on another computer.
Updated operating system: The operating system is updated.
Environment:
Android Studio Version: Android Studio Ladybug Feature Drop | 2024.2.2
Build #AI-242.23726.103.2422. 12816248, built on December 18, 2024
Gradle Version: 8.10.2
Room Dependencies:
val room_version = "2.6.1"
implementation("androidx.room:room-runtime:$room_version")
implementation("androidx.room:room-ktx:$room_version")
implementation("androidx.room:room-guava:$room_version")
testImplementation("androidx.room:room-testing:$room_version")
kapt("androidx.room:room-compiler:$room_version")
Kotlin Plugin: K2 mode (Beta)
Runtime version: 21.0.4+-12508038-b607. 1 amd64
Operating System: Windows 11.0
Device/Emulator: Issue occurs on both physical devices and emulators.
Non-Bundled Plugins:
org.ollide.java2smali (1.6)
com.developerphil.adbidea (1.6.19)
Attachments:
(Attach screenshots of App Inspection, Logcat, and the project structure here)
(Attach the content of the schemas JSON file here)
(Attach the code of the AppDatabase class here)
(Attach the code of an Entity class here)
(Attach the code of a Dao class here)
(Attach the code of the database initialization here)
(Attach the code of the data insertion here)
(Attach the code of the database access here)
(Attach the content of the proguard-rules.pro file here)
(Attach the content of the build.gradle.kts file here)
Request:
Please investigate this issue and provide a fix or workaround. The Database Inspector is a crucial tool for debugging Room databases, and its failure to display information significantly hinders development.