在Android Studio中查看Sqlite的方法

來源:互聯網
上載者:User

標籤:lan   tty   down   知識庫   book   with   ide   代碼   安裝   

只說最好的方法,使用工具stetho:http://facebook.github.io/stetho/ 
1.在Gragle中加上如下語句:

dependencies {    // Stetho core    compile ‘com.facebook.stetho:stetho:1.3.1‘    //If you want to add a network helper    compile ‘com.facebook.stetho:stetho-okhttp3:1.3.1‘}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

2.在自己Android原始碼的Application類中(如果沒有就建立一個,繼承自android.app.Application)的加入代碼:

    @Override    public void onCreate() {        super.onCreate(); Stetho.initializeWithDefaults(this); new OkHttpClient.Builder() .addNetworkInterceptor(new StethoInterceptor()) .build(); }
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

3.編譯app,安裝至手機並運行該app。 
4.開啟Chrome瀏覽器,輸入網址 
chrome://inspect 
5.檢測到手機上啟動並執行app,點擊inspect連結,進入手機資訊管理頁面: 
 
6.在Web SQL中可以輕鬆查看自己的Sqlite表格,並可以輸入sqlite代碼進行操作。

  

在Android Studio中查看Sqlite的方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.