浏览SQLite数据库从Android的工作室 [英] Browse SQLite database from Android Studio

查看:182
本文介绍了浏览SQLite数据库从Android的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有任何的SQLite插件Android的工作室,这将允许用户浏览所创建的数据库?

I would like to know is there any SQLite plugin for Android Studio which will allow user to browse the created database?

推荐答案

目前还没有对DB检查您的应用程序的官方插件。

Currently there isn't an official plugin for DB Inspection in your apps.

  • 您可以使用 DDMS :工具>安卓>作为@ Subhalaxmi的回答说明Android设备监控

  • You can use the DDMS : Tools > Android > Android Device Monitor as described in @Subhalaxmi's answer

有一个测试版插件所提供的 idescout ,你可以尝试这里

There is a beta plugin provided by idescout that you can try here.

还有就是 Stetho 工具被Facebook所提供(开源和免费)

There is the Stetho tool (open source and free) provided by Facebook

我建议你使用 Stetho 开源被Facebook提供的工具。这是实现简单,功能非常强大。

I suggest you using the Stetho open-sourced tool provided by Facebook. It is simple to implement and very powerful.

就在添加依赖你的 build.gradle

dependencies {
    // Stetho core
    compile 'com.facebook.stetho:stetho:1.1.1'

    //If you want to add a network helper
    compile 'com.facebook.stetho:stetho-okhttp:1.1.1'
}

然后,只需初始化工具,在你的应用程序类:

Then just initialize the tool in your Application class:

Stetho.newInitializerBuilder(this)
                            .enableDumpapp(
                                    Stetho.defaultDumperPluginsProvider(this))
                            .enableWebKitInspector(
                                    Stetho.defaultInspectorModulesProvider(this))
                            .build()

最后只需打开 Chrome浏览器在您的PC和navigare中的镀铬://检查

Finally just open Chrome on your pc and navigare in chrome://inspect.

在这里,您可以显示应用程序的数据库(具有读/写功能),并且可以运行查询。

Here you can display the database in the app (with read/write capabilities), and you can run queries.

您可以在这里找到有关Stetho的详细信息:

You can find more info about Stetho here:

  • <一个href="http://gmariotti.blogspot.it/2015/07/a-first-glance-at-stetho-tool.html">http://gmariotti.blogspot.it/2015/07/a-first-glance-at-stetho-tool.html

http://facebook.github.io/stetho/

这篇关于浏览SQLite数据库从Android的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆