The Problem:
The Android Studio App Inspection fails to start, displaying the error message "Could not launch inspector *.inspection: Failed during instantiating inspector with id *.inspection" on a specific project. This issue persists despite clearing caches, restarting/deleting the AVD, and updating all components. The project in question uses OkHttp and WorkManager libraries, unlike other projects where App Inspection works without any issues. The logs show no discernible differences between the affected project and the ones where App Inspection functions correctly.
The Solutions:
Solution 1: Lower the SDK target version
The issue arises when the app is targeted for SDK version 34. To resolve this, change the target SDK version to 33 or below. This involves editing the project’s build.gradle file and updating the compileSdk
and targetSdk
values. For example:
android {
compileSdk 33
targetSdk 33
}
Once the changes are made, rebuild the app and restart Android Studio. The App Inspection should now start without any issues.
Q&A
Is it related to using OkHttp and WorkManager?
No, it is not related to OkHttp and WorkManager.
Any solution about this issue?
Targeting SDK to 33 and it’s fixed.
Video Explanation:
The following video, titled "Database Inspector - YouTube", provides additional insights and in-depth exploration related to the topics discussed in this post.
... Android website → https://goo.gle/30FDT8S Database Inspector ... Troubleshooting app performance issues with System Trace in Android Studio.
The following video, titled "Database Inspector - YouTube", provides additional insights and in-depth exploration related to the topics discussed in this post.
... Android website → https://goo.gle/30FDT8S Database Inspector ... Troubleshooting app performance issues with System Trace in Android Studio.